Check-in [bfbf56bdde]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

SHA1 Hash:bfbf56bdde7e88a522c355e11b7b92345250e1b0
Date: 2012-03-11 00:51:10
User: BarryK
Comment:BootFlash: 128m 1st partition increased to 256m, to handle bigger puppies --not yet tested

Tags And Properties
Changes

Changes to woof-code/rootfs-skeleton/usr/sbin/bootflash

@@ -6,10 +6,11 @@
 #100913 new simplified puppy filenames.
 #101026 .sfs was not getting copied off cd. various improvements.
 #110130 fix for ldlinux.sys deleted, see jinx100 http://murga-linux.com/puppy/viewtopic.php?t=63719&start=165
 #110505 support sudo for non-root user.
 #120201 rodin.s: internationalized.
+#120311 ComboFormat, 128M first partition not big enough for some puppies, change to 256M.
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
 
 export TEXTDOMAIN=bootflash
 export TEXTDOMAINDIR=/usr/share/locale
@@ -298,25 +299,26 @@
   makebootfat --output /dev/$USBDRV --syslinux3 --disk --boot ldlinux.bss --copy ldlinux.sys tempdir
   PUPSAVEPART="${USBDRV}"
   PUPBOOTPART="${USBDRV}"
  else
 
-  #need space for 128MB image...
+  #need space for 256MB image...
   WKGPATH="/tmp"
   FREEM=`df -m | grep ' /tmp$' | tr -s ' ' | cut -f 4 -d ' '`
-  if [ $FREEM -lt 135 ];then
+  [ ! $FREEM ] && FREEM=0
+  if [ $FREEM -lt 300 ];then
    WKGPATH="/root"
    FREEM=`df -m | grep ' /$' | tr -s ' ' | cut -f 4 -d ' '`
-   if [ $FREEM -lt 135 ];then
+   if [ $FREEM -lt 300 ];then
     WKGPATH="`readlink /mnt/home`"
     mhPATTERN=' '"$WKGPATH"'$'
     FREEM=`df -m | grep "$mhPATTERN" | tr -s ' ' | cut -f 4 -d ' '`
    fi
   fi
-  if [ $FREEM -lt 135 ];then
+  if [ $FREEM -lt 300 ];then
    kill $X1PID
-   xmessage -title "$(gettext 'ERROR')" "$(gettext 'SORRY, cannot find 128MB free working space!')"
+   xmessage -title "$(gettext 'ERROR')" "$(gettext 'SORRY, cannot find 256MB free working space!')"
    exit
   fi
 
   if [ "$RADIO_ISO" = "true" ];then
    #need puppy.iso to copy to usb drive...
@@ -324,23 +326,23 @@
    SRCFPATH="`Xdialog --wrap --wmclass "gtkdialog2" --left --backtitle "$(gettext "The 'ISO9660' choice requires the Puppy .iso file to be written directly into the USB drive. Please select it then click 'OK':")" --title "BootFlash: ISO9660 format" --stdout --no-buttons --no-cancel --fselect "*.iso" 0 0`"
    [ $? -ne 0 ] && exit
    #yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text "Please wait, copying .iso file..." &
    yaf-splash -close never -bg orange -text "$(gettext 'Please wait, copying .iso file...')" &
    X1PID=$!
-   rm -f $WKGPATH/image128m 2>/dev/null
-   cp -f "$SRCFPATH" $WKGPATH/image128m
+   rm -f $WKGPATH/image256m 2>/dev/null
+   cp -f "$SRCFPATH" $WKGPATH/image256m
    sync
-   isohybrid $WKGPATH/image128m
+   isohybrid $WKGPATH/image256m
    sync
    PUPSAVEPART="${USBDRV}2"
    PUPBOOTPART="${USBDRV}1"
   else
-   #create 128M empty file...
-   dd if=/dev/zero of=${WKGPATH}/image128m bs=1024 count=131072 #128MB
+   #create 256M empty file...
+   dd if=/dev/zero of=${WKGPATH}/image256m bs=1024 count=262144 #256MB 131072=128MB
    sync
    LOOPDEV="`losetup -f`"
-   losetup $LOOPDEV ${WKGPATH}/image128m
+   losetup $LOOPDEV ${WKGPATH}/image256m
    if [ "$RADIO_ALL" = "true" ];then #ComboFormat
     makebootfat --output $LOOPDEV --syslinux3 --zip --boot ldlinux.bss --mbr mbrfat.bin --mbrfat --copy ldlinux.sys tempdir
     #'--zip' sets partition-4 as bootable, so pup_save will go into partition-1...
     PUPSAVEPART="${USBDRV}1"
     PUPBOOTPART="${USBDRV}4"
@@ -355,13 +357,13 @@
    sync
    losetup -d $LOOPDEV
   fi
 
   #write bootable f.s. to drive...
-  dd if=${WKGPATH}/image128m of=/dev/$USBDRV
+  dd if=${WKGPATH}/image256m of=/dev/$USBDRV
   sync
-  rm -f ${WKGPATH}/image128m
+  rm -f ${WKGPATH}/image256m
 
   #now create partition to fill remaining space on usb drive...
   if [ "$RADIO_ISO" = "true" ];then
    echo -e 'n\np\n2\n\n\nw' | fdisk /dev/$USBDRV #create partition-2
    PARTNUM="2"

Changes to woof-code/rootfs-skeleton/usr/sbin/quicksetup

@@ -30,10 +30,11 @@
 #120226 redraw desktop drive icons when resolution changes (or may change, in the case of running xorgwizard).
 #120227 set hostname, but only if ethernet auto-connected at 1st boot.
 #120228 L18L: enabling adding locale without utf8 using regexp.
 #120301 no, don't load console font here. seems to get dropped on exit from X. (instead, do it in xwin. now have /sbin/load_consolefont)
 #120305 check if langpack available in noarch repo.
+#120311 change persistence logic for 120227.
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@}
 
 export TEXTDOMAIN=quicksetup
 export OUTPUT_CHARSET=UTF-8
@@ -108,17 +109,28 @@
 
 M_close="`gettext 'Close'`"
 
 ###Network###
 #120227 hostname set but only if network connection already available on 1st boot...
+#120311 change the logic, allow this frame to persist...
 NETWORK_XML=""
 if [ "$SET_NETWORK" ];then
  SET_NETWORK=""
- if [ ! -f /var/local/quicksetup-network-check-flag ];then
-  if [ $PUPMODE -eq 5 -o $PUPMODE -eq 2 ];then
-   touch /var/local/quicksetup-network-check-flag
-   if check_internet ;then #case of auto connect to internet via ethernet at 1st boot.
+ if [ ! -f /var/local/quicksetup-network-check-flag1 ];then
+  if [ ! -f /var/local/quicksetup-network-check-flag2 ];then #in case restart X after network connection.
+   touch /var/local/quicksetup-network-check-flag2
+   if [ $PUPMODE -eq 5 -o $PUPMODE -eq 2 ];then
+    #if check_internet ;then #case of auto connect to internet via ethernet at 1st boot.
+    IFCONFIG="`ifconfig | grep '^[pwe]' | grep -v 'wmaster'`" #test network interface up only.
+    if [ "$IFCONFIG" ];then
+     touch /var/local/quicksetup-network-check-flag1
+    fi
+   fi
+  fi
+ fi
+fi
+if [ -f /var/local/quicksetup-network-check-flag1 ];then
     SET_NETWORK="yes"
     HOSTNAME="`cat /etc/hostname`" #do not use $HOSTNAME, as hostname-set may have just been run.
     H_net=$(gettext "Your computer has been assigned a unique name, known as the 'hostname', by which it identifies itself on a network. However, you might wish to change that to a name that is more meaningful to yourself, such as 'johnsmithpc'. The hostname can have letters and numbers, no spaces.")
     export DLG_HELP_NET="<window resizable=\"false\" title=\"$(gettext 'Help: Network')\" icon-name=\"${HELPICON}\" window_position=\"1\"><vbox><text use-markup=\"true\"><label>\"${H_net}\"</label><variable>VAR_HELP_NET</variable></text><hbox><button><label>${M_close}</label><action type=\"closewindow\">VAR_HELP_NET</action></button></hbox></vbox></window>"
     NETWORK_XML="<frame $(gettext 'Network settings')>
@@ -135,14 +147,12 @@
        <input file>/usr/local/lib/X11/mini-icons/mini-question.xpm</input>
        <action type=\"launch\">DLG_HELP_NET</action>
       </button>
      </hbox>
     </frame>"
-   fi
-  fi
- fi
 fi
+
 
 ###Country localization###
 if [ "$SET_COUNTRY" ];then
 
  ###Choose locale###