Check-in [c440074e1c]
Not logged in

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

Overview

SHA1 Hash:c440074e1c05a79ab4aa485bc79220d6acd34e93
Date: 2012-05-10 23:54:32
User: BarryK
Comment:HOSTNAME updated when X restarted after it is changed

Tags And Properties
Changes

Changes to woof-code/3builddistro

@@ -107,10 +107,11 @@
 #120331 bugfix generating README.HTM on cd.
 #120401 improve choosing locale.
 #120502 more support for arm build.
 #120506 support creation of SD-card image (for arm build).
 #120506b check that sd card big enough.
+#120510 offer to resize 2nd partition of SD card to fill card.
 
 #v431 accepts passed params, from woof_gui_tabs:
 #$1=$CHOICE_KERNELPKG $2=$CHOICE_SCSI $3=$CHOICE_BIGMODEM $4=$CHK_FB_STATE $5=$CHK_EXOTIC_STATE $6=$CHK_RADICAL_STATE
 #100912 add $7=CHK_SIMPLE_FILENAMES
 
@@ -2535,11 +2536,11 @@
   echo -n "You chose '${SDIMAGE}' Press ENTER if correct: "
   read sdcorrect
   [ "$sdcorrect" = "" ] && break
  done
  echo
- echo "Please insert the SD card. Make sure that it is the correct size as
+ echo "Please insert the SD card. Make sure that it is the same size or bigger than
 indicated on the filename of the skeleton image file that you chose."
  echo -n "Press ENTER after it is inserted: "
  read waitinsert
  sleep 2
  while [ 1 ];do
@@ -2650,10 +2651,32 @@
  echo
  echo "The image is now ${PUPIMG}.xz and is ${COMPRIMGBYTES}bytes."
  COMPRIMGK=`expr $COMPRIMGBYTES \/ 1024`
  echo "(${COMPRIMGK}KB)"
  echo "Image file may be distributed to others!"
+ echo
+
+ #120510...
+ echo "If the SD card currently plugged in is bigger than the image, for example
+you have a 4GB card and used a 1GB image, optionally now you may increase the
+ext4 partition to fill the remaining space -- this is for your own use."
+ echo -n "ENTER only to decline: "
+ read makebig
+ if [ "$makebig" != "" ];then
+  if [ "`which gparted`" = "" ];then
+   echo "ERROR, gparted not installed!!!"
+  else
+   gparted $SDDEVICE
+   sync
+   echo
+   echo "Checking the ext4 filesystem..."
+   fsck.ext4 -p ${SDDEVICE}2
+   sync
+   echo "$THEDRIVE" > /tmp/pup_event_frontend_block_request
+  fi
+ fi
+
 fi
 
 cd $WKGDIR
 
 #now do the devx...

Changes to woof-code/rootfs-skeleton/usr/bin/xwin

@@ -28,18 +28,20 @@
 #110804 /etc/profile has fix for double-login. need to output '# ' when exit xwin.
 #110807 revert 110804
 #120131 rodin.s: internationalized.
 #120301 load console font on exit from X.
 #120505 automatic network reconnect. refer /usr/sbin/hostname-set
+#120511 hostname-set changed HOSTNAME, via quicksetup, X is restarted, update $HOSTNAME (was exported at bootup in /etc/profile)...
 
 export TEXTDOMAIN=xwin
 export OUTPUT_CHARSET=UTF-8
 eval_gettext () {
   local myMESSAGE=$(gettext "$1")
   eval echo \"$myMESSAGE\"
 }
 export LANGORG=$LANG
+HOSTNAMEORIG=$HOSTNAME #120511
 
 #NUMXWINS=`pidof xwin | wc -w` #w478
 #[ $NUMXWINS -gt 1 ] && exit   #w478
 
 [ -z $DISPLAY ] || exit #v2.11 from GuestToo.
@@ -606,16 +608,23 @@
  [ "$WMEXITMODE" = "reboot" ] && exec /sbin/reboot #see /usr/bin/wmreboot
  #restart window manager...
  #make a gross assumption, if wmexitmode.txt exists, haven't already exited this script, then want
  #to restart maybe with different window manager. /etc/windowmanager already has desired w.m.
  rm -f /tmp/wmexitmode.txt #definitely delete it now.
-  #v1.0.5 thanks GuestToo for advice on this, works with chooselocale script...
-  NEWLANG="`cat /etc/profile | grep '^LANG=' | cut -f 2 -d '='`"
-  if [ "$NEWLANG" ];then #precaution
-   if [ "$NEWLANG" != "$LANG" ];then
-    export LANG=$NEWLANG
-   fi
+ #v1.0.5 thanks GuestToo for advice on this, works with chooselocale script...
+ NEWLANG="`cat /etc/profile | grep '^LANG=' | cut -f 2 -d '='`"
+ if [ "$NEWLANG" ];then #precaution
+  if [ "$NEWLANG" != "$LANG" ];then
+   export LANG=$NEWLANG
+  fi
+ fi
+ #120511 hostname-set changed HOSTNAME, via quicksetup, X is restarted, update $HOSTNAME (was exported at bootup in /etc/profile)...
+ NEWHOSTNAME="`cat /etc/hostname | tr -d '\n'`"
+ if [ "$NEWHOSTNAME" ];then #over-the-top paranoid precaution.
+  if [ "$NEWHOSTNAME" != "$HOSTNAME" ];then
+   export HOSTNAME=$NEWHOSTNAME
   fi
+ fi
  exec xwin
 fi
 
 #the end#