Check-in [546d3717ad]
Not logged in

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

Overview

SHA1 Hash:546d3717ad8e62ef12a9c4da3e8393cece1dea14
Date: 2013-02-23 03:25:54
User: root
Comment:remasterpup2 bug fixes, enhancements, converted translation to gettext method. also, filemnt script fixed.

Tags And Properties
Changes

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

@@ -15,10 +15,11 @@
 #120323 replace 'xmessage' with 'pupmessage'.
 #120525 take into account shinobar's sfs load-on-the-fly pet.
 #121105 added a translation.
 #121203 remove directory if mount goes wrong. thanks MHHP: http://murga-linux.com/puppy/viewtopic.php?t=82654
 #130204 mavrothal: fix spaces in imgFile.
+#130223 BK: fix wonky logic.
 
 export TEXTDOMAIN=filemnt
 export OUTPUT_CHARSET=UTF-8
 . gettext.sh
 
@@ -59,31 +60,18 @@
 fi
 
 #ex: /mnt/home/kernel_src-3.0.7-patched.sfs becomes /mnt/+mnt+home+kernel_src-3.0.7-patched.sfs
 MntPt='/mnt/'"`echo "$imgFile" |sed "s#^\.##g" |sed "s#/#+#g"`"
 
-if [ 1 -eq 2 ] ;then	##############################################	JUMP OVER this SECTION.
- loMnts="`mount |grep '/dev/loop' |awk '{print $1}'`"
- echo "$loMnts" |while read LOOP					### test if file's mounted
- do
-   loFile="`losetup-FULL $LOOP |sed 's/^.*(//' |sed 's/).*$//'`"
-   if [ "$loFile" = "$imgFile" ] ;then
-    echo -e "\n ### Loop File: $loFile"
-    break
-   fi
-   i=`expr $i + 1`
- done
-fi			##############################################	END of JUMP SECTION.
-
-
-							### file's not mounted, mount it
-# if [ $i -eq 16 ] ;then
-
- imgFileBASE="`basename "$imgFile"`" #BK
- imgFileDEV_INODE="`stat -L -c "%d_%i" "$imgFile"`" || exit #120220
-
- if [ ! -d "$MntPt" ] ;then
+#130223 BK is it already mounted?
+MNTEDLOOP="$(cat /proc/mounts | grep "$MntPt" | cut -f 1 -d ' ')"
+
+imgFileBASE="`basename "$imgFile"`" #BK
+imgFileDEV_INODE="`stat -L -c "%d_%i" "$imgFile"`" || exit #120220
+
+if [ "$MNTEDLOOP" = "" ];then #130223 BK
+ #not mounted on $MntPt.
 
   #BK check if already mounted elsewhere...
   for ONELOOP in `mount | grep '^/dev/loop' | cut -f 1 -d ' ' | tr '\n' ' '`
   do
    MNTDIMG_MNT_PT="`mount | grep "^$ONELOOP" | cut -f 3 -d ' '`"   #120220...
@@ -189,36 +177,38 @@
    mount -t $Type -o loop "$imgFile" "$MntPt"
    Err=$?
   fi
 
   if [ $Err -eq 0 ] ;then
-   rox -d "$MntPt" # mount good, run rox filer
+   #130223 BK: got a empty window, use -x option to rescan files...
+   rox -x "$MntPt" -d "$MntPt" # mount good, run rox filer
 #   yaf-splash -timeout 6 -font "8x16" -outline 0 -margin 4 -bg green -text "SUCCESS! Click $imgFileBASE icon again to unmount it" & #BK
 #   /usr/X11R7/bin/yaf-splash -timeout 6 -font "8x16" -outline 0 -margin 4 -bg green -text "SUCCESS! Click $imgFileBASE icon again to unmount it" & #BK
    yaf-splash -timeout 6 -bg green -text "`eval_gettext \"SUCCESS! Click \\\$imgFileBASE icon again to unmount it\"`" & #BK
   else
    rmdir "$MntPt" #121203
   fi
 
- else							### file's mounted, unmount it
-  rox -D "$MntPt" #BK
-  sync #111112
-  umount "$MntPt"
-  Err=$?
-  #if [ "$imgFileBASE" = 'initrd' ] ;then gzip -9 $imgFile ;fi #111112 bug fix. no, remove.
+else							### file's mounted, unmount it
+ rox -D "$MntPt" #BK
+ sync #111112
+ umount "$MntPt"
+ Err=$?
+ #if [ "$imgFileBASE" = 'initrd' ] ;then gzip -9 $imgFile ;fi #111112 bug fix. no, remove.
 #  yaf-splash -timeout 3 -font "8x16" -outline 0 -margin 4 -bg orange -text "Unmounting $imgFileBASE" #BK
 #  /usr/X11R7/bin/yaf-splash -timeout 3 -font "8x16" -outline 0 -margin 4 -bg orange -text "Unmounting $imgFileBASE" #BK
-  yaf-splash -timeout 3 -bg orange -text "$(gettext 'Unmounting') $imgFileBASE" #BK
+ yaf-splash -timeout 3 -bg orange -text "$(gettext 'Unmounting') $imgFileBASE" #BK
   #Xdialog --title " Notice..." --no-button \
   #        --infobox "
   #UnMounting: $imgFile
   #" 0 0 2000
-  echo -e "\n ### UnMount: $imgFile\n"
-  sync #111112
-  rmdir "$MntPt"
- fi
- if [ $Err -ne 0 ] ;then			# ERROR: mount/unmount
-  #xmessage -title " ERROR..." "  Failed mounting or unmounting.  "
-  pupdialog --background red --title "$(gettext 'ERROR')" --msgbox "$(gettext 'Failed mounting or unmounting')" 0 0
- fi
+ echo -e "\n ### UnMount: $imgFile\n"
+ sync #111112
+ rmdir "$MntPt"
+fi
+
+if [ $Err -ne 0 ] ;then			# ERROR: mount/unmount
+ #xmessage -title " ERROR..." "  Failed mounting or unmounting.  "
+ pupdialog --background red --title "$(gettext 'ERROR')" --msgbox "$(gettext 'Failed mounting or unmounting')" 0 0
+fi
 
 ###END###

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

@@ -46,209 +46,51 @@
 #120628 shinobar: no change id-string for reuse
 #120721 revert 'wildcards' option (from 120605); improve /dev/snd file exclusion; exclude /usr/share/icons/hicolor/icon-theme.cache (shinobar).
 #121021 rerwin: revert 120605 modem daemon removals (because daemons no longer copied from firmware directory).
 #130203 change probedisk2 to probedisk.
 #130216 partial support f2fs.
+#130222 convert internationalization from "technosaurus method" to gettext method.
+#130222 virtual-CD detection was broken.
+#130223 various fixes. note, also fixed /usr/sbin/filemnt. now can retain files between remasters.
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
 
-Yes_lbl="Yes"
-No_lbl="No"
-
-# remasterpup2.mo
-m_01="Puppy simple CD remaster"
-m_02="ERROR"
-m_03="This program requires a \$PUPPYSFS file mounted on /initrd\${PUP_LAYER}.\n
-Which is not the case here, probably because this is a full hard drive
-installation?\n
-Whatever, boot Puppy from live-CD and then you will be able to
-use this script.
-\n\n
-Note, I have not tried it, but if you setup the situation of \$PUPPYSFS\n
-mounted on directory /initrd\${PUP_LAYER}, that will be acceptable for this program.\n
-You will also need a current live-CD, as the program gets files off it.\n
-Anyone want to try it?
-\n\n
-Click 'Ok' button to quit..."
-#m_04 skipped
-m_05="Welcome! This little program takes a snapshot of your current system and burns it to CD.
-\n\n
-A Puppy live-CD has 4 main files: vmlinuz, isolinux.cfg, initrd.gz and \$PUPPYSFS. Note, in some builds of Puppy there may also be a 5th file, \${ZDRVSFS}.
-\n\n
-It is \$PUPPYSFS that mainly interests us here: it has the entire Puppy filesystem, everything from '/' down. What this script does is rebuild this file \$PUPPYSFS, with everything currently under '/' -- that is, all user-installed packages, all mounted .sfs extension files, everything, gets combined into one file, \$PUPPYSFS and burnt to CD.
-Note, if you have an 'underdog Linux' mounted, that too will get combined into the \$PUPPYSFS file, so beware, it could get big!
-\n\n
-Click OK button to continue (or close window to quit)..."
-m_06="Calculating needed working space.\nPlease wait, this may take awhile..."
-m_07="currently mounted"
-m_08="not mounted"
-m_09="Filesystem"
-m_10="Size"
-m_11="Free"
-m_12="Note 2: you can use the tmpfs ramdisk, which is in RAM, if it has enough space."
-m_13="A working area is required in which to create the new live-CD iso file.\n
-Here are the available partitions. You must choose one that has at least \${SIZENEEDEDM}M free space on it. Also, if you choose to create an ISO file rather than burn direct to CD/DVD, then you will need an extra 100 - 200MB space (whatever the size of ISO file is going to be).
-\n\n
-If the partition that you would like to use has less than \${SIZENEEDEDM}M free space on it, you will need to quit this script and delete some files.
-\nNote 1: you can use a usb drive, but it needs to have been plugged in before
-        running this script, so that it will get detected.\n
-\${TMPFSMSG}\n
-Highlight desired choice then click OK button..."
-m_14="This remaster program needs to read some files off the current live-CD.\n
-You can also use a .iso file if it is already mounted as a virtual CD."
-m_14_1="Choose the CD/DVD drive..."
-m_14_2="NO CD/DVD drives found."
-m_15="Mounted CD, get rid of it before running this program!"
-m_16="Please insert the current Puppy live-CD into drive \$BURNERDRV.\n
-Then click OK..."
-m_16_1="Do you like to make \$ZDRVSFS, the separate driver file?"
-m_17="Copying files from CD to \$WKGMNTPT/puppylivecdbuild/, please wait..."
-m_18="Creating the \$PUPPYSFS file in \$WKGMNTPT/puppylivecdbuild/.\n
-This can take quite a long time, so please wait.... and wait...\n
-This window will disappear when \$PUPPYSFS is finally created.\n
-Please wait..."
-m_19="This program has created folder /tmp/root, which has everything that is now
-going to be added as /root in the \$PUPPYSFS file.\n
-This is mostly 'pristine', as obviously you do not want all your cache files,
-temp files, email files, and other working/temporary files to be burnt onto
-the CD. However, if you are familiar with the workings of Puppy, you might
-like to take a look at /tmp/root right now, and possibly add anything that
-you want from /root (or remove something!)\n
-(if you think that this program has missed out something important that
- should be burnt into /root on the CD, please let me know -- Barry Kauler)
-\n\n
-After examining /tmp/root,\n
-click 'Ok' to add /root in \$PUPPYSFS file..."
-m_20="Hardware customisation was not chosen."
-m_21="Have created the /etc directory for the new \$PUPPYSFS file.\n
-It is in a 'pristine' state, but you can choose to customise it.\n
-Do you want to add customisations for your hardware? Examples are
-mouse, keyboard, video. But, if you answer 'Yes' here, the live-CD
-will be preconfigured for your PC only. Therefore, it is best to
-answer 'No' if you want to boot the new live-CD on different PCs.
-\n\n
-Click 'Yes' button to customise /etc...
-Click 'No' button not to customise (recommended)..."
-m_22="These files were customised in /etc:\n
-codepage fontmap keyboardtype keymap mousebuttons mousedevice videomode
-eth0mode eth1mode resolv.conf localtime TZ cdburnerdevice dvddevice modemdevice
-securetelnetrc modprobe.d/* rdesktoprc windowmanager xextraoptions X11/xorg.conf
-and directory network-wizard."
-m_23="\$MSG1
-\n\n
-If you know what you are doing, you can now modify any files in /tmp/etc
-folder. This is just about to be added to /etc in the .sfs file.\n
-Do anything you want before clicking 'Ok'.\n
-(If this program has missed something important, let me know -- Barry Kauler)
-\n\n
-Click 'Ok' to add /etc in \$PUPPYSFS file..."
-m_24="Almost ready to burn the CD!\n
-All the files that will be burnt to CD are in \$WKGMNTPT/puppylivecdbuild/.
-\n\n
-The thing that you may want to do is edit isolinux.cfg. It has this:\n
-\$ISOLINUXCFG
-\n\n
-'pmedia' parameter is a hint to Puppy what media you are booting Puppy from.\n
-'pmedia=cd' means any CD/DVD drive. Other options are:\n
- usbflash usbhd usbcd ataflash atahd atacd atazip scsihd scsicd
- (where 'ata' means either IDE or SATA interface, i.e. an internal drive)
-\n\n
-'pkeys' is the default keyboard layout. Example: 'pkeys=us'  Choices are:\n
- azerty be-latin1 br-abnt2 br-abnt br-latin1-abnt2 br-latin1-us by cf croat cz de\n
- de-latin1 dk dvorak dvorak-l dvorak-r es et fi fr gr hu101 hu il it jp106 lt mk\n
- nl no pl pt-latin1 ro ru se sg sk-qwerty sk-qwertz slovene sv-latin1 uk us wangbe
-\n\n
-You may also add any kernel parameters. Some PCs require 'acpi=off' to boot properly.
-\n\n
-(If answer 'Yes', an editor will appear, must exit
- editor before this program will continue)\n
-Click 'Yes' button to edit isolinux.cfg..."
-m_25="Almost ready to burn the CD!\n
-All the files that will be burnt to CD are in \$WKGMNTPT/puppylivecdbuild/.
-\n\n
-If you want to add any more files, say extra SFS files, or to edit or modify the
-files in any way, do it now. Note, if you add an extra SFS file, say 'devx.sfs'
-then it will be available for use when you boot the new live-CD.
-\n\n
-If you want to make any changes, use ROX-Filer to open \$WKGMNTPT/puppylivecdbuild/
-and do so now, before clicking the OK button."
-m_25_1="No boot loaders found. You need isolinux.bin or grldr to make bootable CD.\nClick 'OK' to quit.(leaving \$WKGMNTPT/puppylivecdbuild/ files in existence)"
-m_26="All the files that will be burnt to CD/DVD are in \$WKGMNTPT/puppylivecdbuild/.
-\n\n
-As the working partition may have limited space (for example, you are using a USB pen drive), these files are burnt direct to CD/DVD, rather than create an intermediary iso file. If you do need an iso file, you can copy it from the CD afterward (dd if=/dev/\$BURNERDRV of=puppy.iso seek=0 bs=32k).
-\n\n
-However, if you just want to create an iso file now and not burn to CD/DVD, click the 'No' button.
-\n\n
-Click 'No' button (or close-box on window) to quit program at this point (leaving  \$WKGMNTPT/puppylivecdbuild/ files in existence), and further option to create an iso file...\n
-Click 'Yes' button to burn to CD/DVD..."
-m_27="Click 'Yes' button to create a 'custom-puppy.iso' in \${WKGMNTPT}/ (assuming that there is 100MB-200MB free space)...\n
-Click 'No' button (or close-box on window) to quit program at this point (leaving  \${WKGMNTPT}/puppylivecdbuild/ files in existence)..."
-m_27_1="You can add the CD volume ID,
-it can be used on Windows and on some Linux system."
-m_28_1="\$WKGMNTPT/custom-puppy.iso created."
-m_28_2="ISO files not created."
-m_28="\$WKGMNTPT/puppylivecdbuild/ files left in existence.\n
-Click 'Ok' button to quit..."
-m_29="Please choose the media to burn to.\n
-The burner drive is /dev/\$BURNERDRV, and obviously it must be able to burn a DVD if you want to burn a DVD!
-\n\n
-Note, you can later use the 'dd' program to create an iso file:\n
- # dd if=/dev/\$BURNERDRV of=puppy.iso seek=0 bs=32k
-\n\n
-PLEASE INSERT THE NEW CD OR DVD RIGHT NOW, THEN CHOOSE FROM MENU..."
-m_30="New blank recordable CD"
-m_31="New blank DVD-R (not +R, -RW, +RW)"
-m_32="Finished. Press ENTER key to continue"
-m_33="You should now have a new custom Puppy live-CD!
-\n\n
-WARNING:\n
-There is a tricky situation here, as all the installed packages (plus anything else that you may have installed, such as loaded .sfs extension files, have all been burnt to CD/DVD).
-But, they are still installed in the current \${DISTRO_FILE_PREFIX}save.2fs, the Puppy persistent storage file (where all your stuff gets saved, so it is there next time Puppy is booted). All those files are duplicated, but will that do any harm if you boot the new CD? ...should be okay, but I recommend that you uninstall as much as possible right now, before booting the new CD. Note, do not uninstall them after booting the new CD as that will also 'delete' the packages burnt onto the CD.
-\n\n
-Or, easiest and cleanest option, boot Puppy with 'pfix=ram' boot parameter then at shutdown create a brand new '${DISTRO_FILE_PREFIX}save' file. In fact, this is the wisest thing to do regardless, as you don't even know if the custom CD is going to work properly -- so it is best to bootup in ram only to find out!"
-m_34="You need to choose a burner drive so that the files created by this program can be burnt to a new CD/DVD."
-m_35="\$SFSPATH found.\nDo you reuse it without any change?"
-# end of remasterpup2.mo
-
-# I18N
-# set locale
-# myLOCALE=$LANG # is enough for puppy. but this code is more general.
-for myLOCALE in C $(echo $LANGUAGE|cut -d':' -f1) $LC_ALL $LANG;do :;done	# ex. 	ja_JP.UTF-8
-# search locale file
-myLOCALE1=$(echo $myLOCALE|cut -d'.' -f1)		# ex.	ja_JP
-myLOCALE2=$(echo $myLOCALE|cut -d'_' -f1)	# ex.	ja
-LOCALEDIR=/usr/share/locale
-LOCALEFILE=$(basename $0).mo
-for D in C $myLOCALE2 $myLOCALE1 $myLOCALE
-do
-	F="$LOCALEDIR/$D/LC_MESSAGES/$LOCALEFILE"
-	[ -f "$F" ] && . "$F"
-done
-# end of I18N
+export TEXTDOMAIN=remasterpup2x #NOTE: rename to avoid clash with 'remasterpup2.mo' used by previous i18n method.
+export OUTPUT_CHARSET=UTF-8
+. gettext.sh
+
+Yes_lbl="$(gettext 'Yes')"
+No_lbl="$(gettext 'No')"
+m_01="$(gettext 'Puppy simple CD remaster')" #window title.
+m_02="$(gettext 'ERROR')"
+m_07="$(gettext 'currently mounted')"
+m_08="$(gettext 'not mounted')"
 
 choice_cdd () {
-#copy files off live-cd.... w018 use probedisk2...
-#DRIVESFND="`probedisk2 2>&1`"
-#IDEDRVSFND="`test-eide 2>&1 | grep "cdrom"`"
-SELECTIONS="`probedisk 2>&1 | grep '^/dev/' | grep "|optical|" | cut -f 1,3 -d "|" | tr " " "_" | tr "|" " " | tr '$' "_"`"
-#zSELECTIONS="`echo "$SELECTIONS" | tr '\n' ' '`" #v431 bugfix. # shinobar: need not for this code
-SELECTIONS="$SELECTIONS $VIRTUALCD"
-if [ "$(echo "$SELECTIONS"|tr -d ' ')" = "" ]; then
-	Xdialog --wrap --left --title "$m_01: $m_02" --msgbox "$m_14_2
-$MSG" 0 0
-	exit
-fi
-DIALOG="Xdialog --wrap --left --title \"$m_01\" --stdout --menubox \"$MSG\n\n$m_14_1\" 0 48 4 $SELECTIONS 2> /dev/null"
-BURNERDRV=""
-RESULT=$(eval $DIALOG) #w018	# 22jun09
-[ $? -ne 0 ] && exit
-BURNERDRV=$RESULT
-[ "$BURNERDRV" = "" ] && exit
-BURNERDRV="`echo -n "$BURNERDRV" | cut -f 3 -d '/'`"
+ #copy files off live-cd.... w018 use probedisk2...
+ #DRIVESFND="`probedisk2 2>&1`"
+ #IDEDRVSFND="`test-eide 2>&1 | grep "cdrom"`"
+ SELECTIONS="`probedisk 2>&1 | grep '^/dev/' | grep "|optical|" | cut -f 1,3 -d "|" | tr " " "_" | tr "|" " " | tr '$' "_"`"
+ #zSELECTIONS="`echo "$SELECTIONS" | tr '\n' ' '`" #v431 bugfix. # shinobar: need not for this code
+ SELECTIONS="$SELECTIONS $VIRTUALCD"
+ if [ "$(echo "$SELECTIONS"|tr -d ' ')" = "" ]; then
+  m_14_2="$(gettext 'NO CD/DVD drives found.')"
+  Xdialog --wrap --left --title "$m_01: $m_02" --msgbox "$m_14_2
+$MSG" 0 80
+  exit
+ fi
+ m_14_1="$(gettext 'Choose the CD/DVD drive...')"
+ DIALOG="Xdialog --wrap --left --title \"$m_01\" --stdout --menubox \"$MSG\n\n$m_14_1\" 0 56 4 $SELECTIONS 2> /dev/null"
+ BURNERDRV=""
+ RESULT=$(eval $DIALOG) #w018	# 22jun09
+ [ $? -ne 0 ] && exit
+ BURNERDRV=$RESULT
+ [ "$BURNERDRV" = "" ] && exit
+ BURNERDRV="`echo -n "$BURNERDRV" | cut -f 3 -d '/'`"
 }
 
-LANG=C #faster, plus Xdialog happier.
+#LANG=C #faster, plus Xdialog happier.
 KERNELVER="`uname -r`"
 
 #120512 01micko: set compression
 COMP=""
 mksquashfs -help &>/tmp/mk #refuses to grep from stdout
@@ -299,25 +141,44 @@
 IDSTRING="${IDSTRING}${EXTX}" #32 bytes ex: w110423092024ZZZZ5.1.2XXXXXXXXXX
 
 PPATTERN="/initrd${PUP_LAYER}"
 if [ "`mount | grep "$PPATTERN"`" = "" ];then
  #no puppy.sfs file mounted on pup_ro2, probably h.d. install...
- eval m_03=\"$m_03\"
- Xdialog --wrap --left --title "$m_01: $m_02" --msgbox "$m_03" 0 0
+ m_03="$(eval_gettext 'This program requires a ${PUPPYSFS} file mounted on /initrd${PUP_LAYER}.')
+$(gettext 'Which is not the case here, probably because this is a full hard drive installation?')
+$(gettext 'Whatever, boot Puppy from live-CD and then you will be able to use this script.')
+
+$(eval_gettext 'Note, I have not tried it, but if you setup the situation of ${PUPPYSFS} mounted on directory /initrd${PUP_LAYER}, that will be acceptable for this program.')
+$(gettext 'You will also need a current live-CD, as the program gets files off it.')
+$(gettext 'Anyone want to try it?')
+
+$(gettext "Click 'Ok' button to quit...")"
+ #pupdialog --title "m_01: m_02"  --msgbox "$m_03" 0 0
+ Xdialog --wrap --left --title "m_01: m_02"  --msgbox "$m_03" 0 80
  exit
 fi
 
 SAVEPART="$PDEV1" #from PUPSTATE.
 CDR="/dev/$SAVEPART"
 
 #choose where to create isolinux-builds/ directory...
-eval m_05=\"$m_05\"
-Xdialog --wrap --left --title "$m_01" --msgbox "$m_05" 0 0
-
-[ ! $? -eq 0 ] && exit
+m_05="$(gettext 'Welcome! This little program takes a snapshot of your current system and burns it to CD.')
+
+$(eval_gettext 'A Puppy live-CD has 4 main files: vmlinuz, isolinux.cfg, initrd.gz and ${PUPPYSFS}. Note, in some builds of Puppy there may also be a 5th file, ${ZDRVSFS}.')
+
+$(eval_gettext "It is \${PUPPYSFS} that mainly interests us here: it has the entire Puppy filesystem, everything from '/' down. What this script does is rebuild this file \${PUPPYSFS}, with everything currently under '/' -- that is, all user-installed packages, all mounted .sfs extension files, everything, gets combined into one file, \${PUPPYSFS} and burnt to CD.")
+$(eval_gettext "Note, if you have an 'underdog Linux' mounted, that too will get combined into the \${PUPPYSFS} file, so beware, it could get big!")
+
+$(gettext 'Click OK button to continue (or close window to quit)...')"
+#pupdialog --title "$m_01" --msgbox "$m_05" 0 0
+Xdialog --wrap --left --title "$m_01" --msgbox "$m_05" 0 80
+
+[ $? -ne 0 ] && exit
 
 #calc size needed...
+m_06="$(gettext 'Calculating needed working space.')
+$(gettext 'Please wait, this may take awhile...')"
 Xdialog --wrap --left  --title "$m_01" --no-buttons --ignore-eof  --infobox "$m_06" 0 0 0 &
 XPID=$!
 SIZEOPT=0
 SIZEBIN=`du -sk /bin | cut -f 1`
 SIZESBIN=`du -sk /sbin | cut -f 1`
@@ -327,12 +188,12 @@
 [ -d /opt ] && SIZEOPT=`du -sk /opt | cut -f 1`
 sync
 #kill $XPID
 #SIZETOTALK=`expr $SIZEBIN + $SIZESBIN + $SIZELIB + $SIZEUSR + $SIZEOPT`
 #SIZETOTALM=`expr $SIZETOTALK \/ 1024`
-SIZETOTALK=`dc $SIZEBIN $SIZESBIN + $SIZELIB + $SIZEUSR + $SIZEOPT + p`
-SIZETOTALM=`dc $SIZETOTALK 1024 \/ p| cut -d'.' -f1`	# 01jul09
+SIZETOTALK=`LANG=C dc $SIZEBIN $SIZESBIN + $SIZELIB + $SIZEUSR + $SIZEOPT + p`
+SIZETOTALM=`LANG=C dc $SIZETOTALK 1024 \/ p| cut -d'.' -f1`	# 01jul09
 [ "$SIZETOTALM" ] || SIZETOTALM=1
 #echo "SIZETOTALM=$SIZETOTALM"
 #estimate a compressed size...
 SIZENEEDEDM=`expr $SIZETOTALM \/ 3`
 SIZESLACKM=`expr $SIZENEEDEDM \/ 3` #guess
@@ -345,25 +206,25 @@
  echo -n "" > /tmp/schoices.txt
  echo "$PARTSLIST" |
  while read APART
  do
   [ "$APART" = "" ] && continue #v3.01 preaution
-  MNTSTATUS="($m_07)"
+  MNTSTATUS="($m_07)" #"currently mounted"
   ATAG="`echo -n "$APART" | cut -f 1 -d '|' | cut -f 3 -d '/'`"
   ASIZE="`echo -n "$APART" | cut -f 3 -d '|'`"
   AFS="`echo -n "$APART" | cut -f 2 -d '|'`"
   AFPATTERN="^/dev/$ATAG " #v3.01
   AFREE="`df -m | grep "$AFPATTERN" | tr -s " " | cut -f 4 -d " "`"
   FLAG_RO='no' #v431
   if [ ! "$AFREE" ];then
-   MNTSTATUS="($m_08)"
+   MNTSTATUS="($m_08)" #"not mounted"
    mkdir -p /mnt/$ATAG
    mount -t $AFS /dev/$ATAG /mnt/$ATAG > /dev/null 2>&1
    if [ $? -eq 0 ];then
     if [ "$ATAG" = "fd0" ];then
      FFREE=`df -k | grep "$AFPATTERN" | tr -s " " | cut -f 4 -d " "`
-     AFREE="`dc $FFREE 1024 \/ p`"
+     AFREE="`LANG=C dc $FFREE 1024 \/ p`"
     else
      AFREE="`df -m | grep "$AFPATTERN" | tr -s " " | cut -f 4 -d " "`"
     fi
     [ "`mount | grep "$AFPATTERN" | grep ' (rw'`" = "" ] && FLAG_RO='yes' #v431 make sure writable.
     umount /dev/$ATAG
@@ -379,32 +240,45 @@
  SCHOICES="`cat /tmp/schoices.txt`"
 
 #add tmpfs ramdisk choice...
 SIZETMPFSM="`df -m | grep '^tmpfs' | grep '/initrd/pup_rw' | tr -s " " | cut -f 4 -d " "`"
 TMPFSMSG=''
+m_09="$(gettext 'Filesystem')"
+m_10="$(gettext 'Size')"
+m_11="$(gettext 'Free')"
+
 if [ "$SIZETMPFSM" != "" ];then
  TOTALTMPFSM="`df -m | grep '^tmpfs' | grep '/initrd/pup_rw' | tr -s " " | cut -f 2 -d " "`"
  if [ "$SCHOICES" = "" ];then #v3.01
   SCHOICES="ramdisk \"$m_09: tmpfs  $m_10: ${TOTALTMPFSM}M  $m_11: ${SIZETMPFSM}M ($m_07)\" \\"
  else
   SCHOICES="$SCHOICES
 ramdisk \"$m_09: tmpfs  $m_10: ${TOTALTMPFSM}M  $m_11: ${SIZETMPFSM}M ($m_07)\" \\"
  fi
+ m_12="$(gettext 'Note 2: you can use the tmpfs ramdisk, which is in RAM, if it has enough space.')"
  TMPFSMSG="$m_12
  "
 fi
 
 [ "$SCHOICES" = "" ] && exit #precaution.
- eval m_13=\"$m_13\"
+m_13="$(gettext 'A working area is required in which to create the new live-CD iso file.')
+$(eval_gettext 'Here are the available partitions. You must choose one that has at least ${SIZENEEDEDM}M free space on it.') $(gettext 'Also, if you choose to create an ISO file rather than burn direct to CD/DVD, then you will need an extra 100 - 300MB space (whatever the size of ISO file is going to be).')
+
+$(eval_gettext 'If the partition that you would like to use has less than ${SIZENEEDEDM}M free space on it, you will need to quit this script and delete some files.')
+
+$(gettext 'Note 1: you can use a usb drive, but it needs to have been plugged in before running this script, so that it will get detected.')
+${TMPFSMSG}
+$(gettext 'Highlight desired choice then click OK button...')"
  echo '#!/bin/sh' > /tmp/savedlg
- echo -n "Xdialog --wrap --left --stdout --title \"$m_01\" --menubox \"$m_13\" 0 0 5 " >> /tmp/savedlg
+ echo -n "Xdialog --wrap --left --stdout --title \"$m_01\" --menubox \"$m_13\" 0 80 5 " >> /tmp/savedlg
  echo "$SCHOICES"  >> /tmp/savedlg
  echo ' > /tmp/tag.txt' >> /tmp/savedlg
  chmod 755 /tmp/savedlg
 
 kill $XPID
 /tmp/savedlg
+[ $? -ne 0 ] && exit #130223
 WKGPART="`cat /tmp/tag.txt`"
 echo "WKGPART=$WKGPART"
 [ "$WKGPART" = "" ] && exit
 #[ "$WKGPART" = "ramdisk" ] && WKGPART="tmpfs"
 
@@ -427,19 +301,75 @@
 
 # reuse if sfs file already exists
 NEW="yes"
 SFSPATH=$(ls -1 $WKGMNTPT/puppylivecdbuild/$PUPPYSFS 2>/dev/null)
 if [ "$SFSPATH" != "" -a $(echo "$SFSPATH" | wc -l) -eq 1 ]; then
-	eval m_35=\"$m_35\"
-	Xdialog --wrap --left --title "$m_01" --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_35" 0 0 && NEW="no"
+ m_35="$(eval_gettext '${SFSPATH} found.')
+$(gettext 'Do you want to reuse it without any change?')
+$(gettext "If uncertain, click the 'No' button")"
+ Xdialog --wrap --left --title "$m_01" --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_35" 0 0 && NEW="no"
 fi
 SFSPATH=""
 
 if [ "$NEW" = "yes" ]; then  ###### long skip if, cleating new sfs
 
-VIRTUALCD=$(mount -t iso9660|grep '^/dev/loop' | sed -e 's/on[ ].*+//' -e 's/[ ]type[ ]iso9660[ ].*$//')
-#VIRTUALCD="`grep -E "loop.*iso9660" /proc/mounts | cut -f 1-2 -d ' ' | tr '\n' ' '`" #110808 PANZERKOPF bug fix. 110822 reverted.
+#130223 i think should wipe contents of $WKGMNTPT/puppylivecdbuild?
+if [ -d $WKGMNTPT/puppylivecdbuild ];then
+ [ -f $WKGMNTPT/puppylivecdbuild/$PUPPYSFS ] && rm -f $WKGMNTPT/puppylivecdbuild/$PUPPYSFS
+ [ -f $WKGMNTPT/puppylivecdbuild/$ZDRVSFS ] && rm -f $WKGMNTPT/puppylivecdbuild/$ZDRVSFS
+ m_41="$(eval_gettext 'Directory ${WKGMNTPT}/puppylivecdbuild already exists.')
+
+$(gettext "Normally, this would be created fresh, empty. However, it exists from a previous execution of 'remasterpup2' script (this program), with files in it. You may choose to leave these files in-place, for the current remaster. If uncertain, click the 'Erase' button.")
+
+$(gettext 'Note, if you choose to retain the files: The next operation is this script will will read files from a CD, however they will not over-write existing files. Therefore, any customised files will be retained.')
+
+$(gettext "WARNING: If the files in 'puppylivecdbuild' are for a different version of Puppy, click the 'Erase' button.")
+$(gettext "Again, warning, if at all uncertain, click the 'Erase' button.")
+
+$(gettext "Click 'Keep' button to retain the files...")
+$(gettext "Click 'Erase' button to delete the files...")"
+ lbl_41="$(gettext 'Keep')"
+ lbl_42="$(gettext 'Erase')"
+ Xdialog --wrap --left --title "$m_01" --ok-label "$lbl_41" --cancel-label "$lbl_42" --yesno "$m_41" 0 80
+ [ $? -ne 0 ] && rm -rf $WKGMNTPT/puppylivecdbuild
+fi
+
+#130222
+m_42=""
+if [ -d $WKGMNTPT/puppylivecdbuild ];then
+ m_42="
+
+$(gettext 'NOTICE:')
+$(eval_gettext 'Directory ${WKGMNTPT}/puppylivecdbuild already exists.')
+$(gettext 'If you want to re-use the files in it, and not re-read files from the CD (or virtual-CD), just click the window close-box to bypass this operation.')
+$(gettext '(You may view the directory contents with a file-manager to satisfy yourself whether these files should be re-used)')"
+fi
+m_40="$(gettext 'This remaster program needs to read some files off the current live-CD.')
+
+$(gettext "However, if a CD-image file (which has filename extension .iso) is mounted, the files may be read from that. We refer to this as a 'virtual CD'. To mount a virtual CD, just click on a .iso file.")
+
+$(gettext "WARNING: Be sure that the live-CD or .iso file is the correct one for the currently running Puppy, which is '${DISTRO_NAME}', version ${DISTRO_VERSION}. As a check, it must have in it the file '${DISTRO_PUPPYSFS}'")
+
+$(gettext "If you want to read the files off a .iso file rather than a CD/DVD, please click on the .iso file right now (before clicking the 'OK' button below)")
+$(gettext "Alternatively, if you want to read the files off a Puppy live-CD, insert it in drive, then click 'OK' button.")${m_42}"
+Xdialog --wrap --left  --title "$m_01" --msgbox "$m_40" 0 80
+
+if [ $? -eq 0 ];then #130223 big if "BIGIF2"
+
+#130222 fix this...
+#VIRTUALCD=$(mount -t iso9660|grep '^/dev/loop' | sed -e 's/on[ ].*+//' -e 's/[ ]type[ ]iso9660[ ].*$//')
+##VIRTUALCD="`grep -E "loop.*iso9660" /proc/mounts | cut -f 1-2 -d ' ' | tr '\n' ' '`" #110808 PANZERKOPF bug fix. 110822 reverted.
+#VIRTUALCD="$(busybox mount | grep -E 'type udf|type iso9660' | cut -f 1,3 -d ' ' | tr '\n' ' ')"
+VIRTUALCD=""
+BBLOSETUP="$(losetup-FULL | tr '\t' ' ' | tr -s ' ')"
+for ONELOOP in `cat /proc/mounts | grep -E ' udf | iso9660 ' | cut -f 1 -d ' ' | tr '\n' ' '`
+do
+ ONEISO="$(echo "$BBLOSETUP" | grep "^${ONELOOP} " | rev | cut -f 1 -d '/' | rev)"
+ VIRTUALCD="${VIRTUALCD} ${ONELOOP} ${ONEISO}"
+done
+m_14="$(gettext 'This remaster program needs to read some files off the current live-CD.')
+$(gettext 'You can also use a .iso file if it is already mounted as a virtual CD (you would need to have previously clicked on a .iso file to mount it).')"
 MSG="$m_14"
 choice_cdd
 
 CDPATTERN="/dev/$BURNERDRV "
 CDMNTPT="`mount | grep "$CDPATTERN" | tr -s " " | cut -f 3 -d " "`"
@@ -449,19 +379,21 @@
   xFUSER="`fuser -m /dev/$BURNERDRV 2>/dev/null`" #do this first, seems to fix it.
   [ "$xFUSER" != "" ] && fuser -k -m /dev/$BURNERDRV
   sync
   umount /dev/$BURNERDRV 2> /dev/null
   if [ $? -ne 0 ];then
+   m_15="$(gettext 'Mounted CD, get rid of it before running this program!')"
    Xdialog --wrap --left  --title "$m_02" --msgbox "$m_15" 0 0
    exit
   fi
   CDMNTPT=""
  fi
 fi
 
 if [ "$CDMNTPT" = "" ];then
- eval m_16=\"$m_16\"
+ m_16="$(eval_gettext 'Please insert the current Puppy live-CD into drive ${BURNERDRV}.')
+$(gettext 'Then click OK...')"
  while [ 1 ];do
  Xdialog --wrap --left  --title "$m_01" --msgbox "$m_16" 0 0
  [ $? -eq 0  ] || exit	# 22jun09
  #now mount it...
  CDMNTPT="/mnt/$BURNERDRV"
@@ -469,54 +401,46 @@
  mount -t iso9660 /dev/$BURNERDRV /mnt/$BURNERDRV
  [ $? -eq 0 ] && break
  done
 fi
 
-eval m_16_1=\"$m_16_1\"
-Xdialog --wrap --left  --title "$m_01" --default-no --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_16_1" 0 0
-[ $? -eq 0 ] && MKZDRV="yes" || MKZDRV=""
-
 #now get the files off it...
-#firstly need working place to write to...
-[ "$WKGPART" = "ramdisk" ] && WKGMNTPT="/"
-WPATTERN="/dev/$WKGPART "
-[ "$WKGMNTPT" = "" ] && WKGMNTPT="`mount | grep "$WPATTERN" | tr -s " " | cut -f 3 -d " "`"
-#[ "$WKGMNTPT" = "/initrd/pup_rw" ] && WKGMNTPT="/"
-if [ "$WKGMNTPT" = "" ];then
- PPATTERN="^$WKGPART "
- WKGFS="`echo "$SCHOICES" | grep "$PPATTERN" | cut -f 2 -d ':' | cut -f 2 -d " "`"
- [ "$WKGFS" = "msdos" ] && WKGFS="vfat"
- mkdir -p /mnt/$WKGPART
- mount -t $WKGFS /dev/$WKGPART /mnt/$WKGPART
- [ $? -ne 0 ] && exit #precaution.
- WKGMNTPT="/mnt/$WKGPART"
-fi
-[ "$WKGMNTPT" = "/" ] && WKGMNTPT=""
-
-eval m_17=\"$m_17\"
+m_17="$(eval_gettext 'Copying files from CD to ${WKGMNTPT}/puppylivecdbuild/, please wait...')"
 Xdialog --wrap --left  --title "$m_01" --no-buttons --ignore-eof   --infobox "$m_17" 0 0 0 &
 XPID=$!
-rm -rf $WKGMNTPT/puppylivecdbuild #precaution
-mkdir $WKGMNTPT/puppylivecdbuild
+#rm -rf $WKGMNTPT/puppylivecdbuild 2>/dev/null #precaution. 130223 see above.
+mkdir -p $WKGMNTPT/puppylivecdbuild
 #now copy the files... # v431JP HTM, ICO, INF
    sync
    for F in vmlinuz initrd.gz ${ZDRVSFS} grldr menu.lst '*.xpm' isolinux.bin isolinux.cfg '*.msg' '*.16' '*.HTM*' '*.ICO' '*.INF'
    do
-	cp $CDMNTPT/$F $WKGMNTPT/puppylivecdbuild/ 2> /dev/null
+    #130223 -n means do not override an existing file...
+	cp -a -n $CDMNTPT/$F $WKGMNTPT/puppylivecdbuild/ 2> /dev/null
 	sync
    done
 umount /dev/$BURNERDRV 2> /dev/null
-
+rox -D $CDMNTPT #130223
 kill $XPID
-eval m_18=\"$m_18\"
+
+fi #end "BIGIF2"
+
+m_16_1="$(eval_gettext 'Do you like to make ${ZDRVSFS}, the separate driver file?')"
+Xdialog --wrap --left  --title "$m_01" --default-no --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_16_1" 0 0
+[ $? -eq 0 ] && MKZDRV="yes" || MKZDRV=""
+[ $? -eq 255 ] && exit #130223
+
+m_18="$(eval_gettext 'Creating the ${PUPPYSFS} file in ${WKGMNTPT}/puppylivecdbuild/.')
+$(gettext 'This can take quite a long time, so please wait.... and wait...')
+$(eval_gettext 'This window will disappear when ${PUPPYSFS} is finally created.')
+$(gettext 'Please wait...')"
 Xdialog --wrap --left  --title "$m_01" --no-buttons --ignore-eof   --infobox "$m_18" 0 0 0 &
 XPID=$!
 
 #create new puppy.sfs file...
 squash() {
 	echo $0 $@
-	rxvt -bg orange -fg black -title "$m_01" -geometry 80x6 -e mksquashfs $@
+	rxvt -bg orange -fg black -title "$m_01" -geometry 80x6 -e mksquashfs $@ 2> /dev/null
 }
 DIRHOME=""
 [ -d /home ] && DIRHOME="/home"
 [ -d /sys ] && DIRSYS="/sys"
 [ -d /lost+found ] && DIRLOST="/lost+found"
@@ -527,21 +451,25 @@
 #note, /home could be in underdog linux...
 
 # modules copied from initrd
 ANOTHER_REMOVE="/lib/modules/$KERNELVER/initrd /lib/modules/*/modules.*"	# 28dec09 modules.*
 if [ "$MKZDRV" = "yes" ]; then
-  rm -f $WKGMNTPT/puppylivecdbuild/$ZDRVSFS
+  rm -f $WKGMNTPT/puppylivecdbuild/$ZDRVSFS 2> /dev/null
   mksquashfs /lib $WKGMNTPT/puppylivecdbuild/$ZDRVSFS -keep-as-directory -e /lib/[^m]* $ANOTHER_REMOVE
   ANOTHER_REMOVE="/lib/modules"
 fi
 #120605 Omit certain /dev subdir content and modem components loaded from firmware tarballs...
 [ -d /dev/snd ] && [ "`ls /dev/snd`" != "" ] && DIRDEVSNDFILES="/dev/snd/*" #120721
 [ -d /dev/.udev ] && DIRDEVUDEV="/dev/.udev"
 #121021 modem daemons now left in place.
 [ -f /usr/share/icons/hicolor/icon-theme.cache ] && ICONCACHE=/usr/share/icons/hicolor/icon-theme.cache #120721
+TOPPLCDB=''
+[ -e /puppylivecdbuild ] && TOPPLCDB='/puppylivecdbuild'
+TOPPUPSFS=''
+[ -e /${PUPPYSFS} ] && TOPPUPSFS="/${PUPPYSFS}"
 # display terminal only for the first stage because it takes the most of time. 'squash' is a function, see above. 120512 $COPTIONS added...
-squash / $WKGMNTPT/puppylivecdbuild/$PUPPYSFS ${COPTIONS} -e /etc /proc /initrd /var /tmp /archive /mnt /root /puppylivecdbuild $ANOTHER_REMOVE $DIRHOME $DIRSYS $DIRLOST /$PUPPYSFS $DIRDEVSNDFILES $DIRDEVUDEV $ICONCACHE #120605 end #120721 avoid wildecards option, icon-theme.cache 121021
+squash / $WKGMNTPT/puppylivecdbuild/$PUPPYSFS ${COPTIONS} -e /etc /proc /initrd /var /tmp /archive /mnt /root $TOPPLCDB $ANOTHER_REMOVE $DIRHOME $DIRSYS $DIRLOST $TOPPUPSFS $DIRDEVSNDFILES $DIRDEVUDEV $ICONCACHE  #120605 end #120721 avoid wildecards option, icon-theme.cache 121021
 sync
 
 #add pristine folders (out of current puppy.sfs)...
 mksquashfs /initrd${PUP_LAYER}/proc $WKGMNTPT/puppylivecdbuild/$PUPPYSFS -keep-as-directory
 sync
@@ -632,12 +560,16 @@
 echo -n "" > /tmp/root/.packages/user-installed-packages #v431
 sync #120607
 rm -f /tmp/root/.packages/*.files #120607
 rm -f /tmp/root/.packages/*.remove #120607
 
-eval m_19=\"$m_19\"
-Xdialog --wrap --left --title "$m_01" --msgbox "$m_19" 0 0
+m_19="$(eval_gettext 'This program has created folder /tmp/root, which has everything that is now going to be added as /root in the ${PUPPYSFS} file.')
+$(gettext "This is mostly 'pristine', as obviously you do not want all your cache files, temp files, email files, and other working/temporary files to be burnt onto the CD. However, if you are familiar with the workings of Puppy, you might like to take a look at /tmp/root right now, and possibly add anything that you want from /root (or remove something!)")
+$(gettext '(if you think that this program has missed out something important that  should be burnt into /root on the CD, please let me know -- Barry Kauler)')
+
+$(eval_gettext "After examining /tmp/root, click 'Ok' to add /root in \${PUPPYSFS} file...")"
+Xdialog --wrap --left --title "$m_01" --msgbox "$m_19" 0 80
 sync
 [ "`ls /tmp/root/.packages/*.files`" = "" ] && CLEARPKGLOG="yes" || CLEARPKGLOG="no" #120607 in case user copied entire /root to /tmp for boot disk.
 mksquashfs /tmp/root $WKGMNTPT/puppylivecdbuild/$PUPPYSFS -keep-as-directory
 sync
 rm -rf /tmp/root
@@ -672,13 +604,19 @@
 sync
 
 cp -af /etc/eventmanager /tmp/etc/ #v411
 
 #what about settings for a particular pc?...
+m_20="$(gettext 'Hardware customisation was not chosen.')"
 MSG1="$m_20"
-eval m_21=\"$m_21\"
-Xdialog --wrap --left --title "$m_01" --default-no --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_21" 0 0
+m_21="$(eval_gettext 'Have created the /etc directory for the new ${PUPPYSFS} file.')
+$(gettext "It is in a 'pristine' state, but you can choose to customise it.")
+$(gettext "Do you want to add customisations for your hardware? Examples are mouse, keyboard, video. But, if you answer 'Yes' here, the live-CD will be preconfigured for your PC only. Therefore, it is best to answer 'No' if you want to boot the new live-CD on different PCs.")
+
+$(gettext "Click 'Yes' button to customise /etc...")
+$(gettext "Click 'No' button not to customise (recommended)...")"
+Xdialog --wrap --left --title "$m_01" --default-no --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_21" 0 80
 if [ $? -eq 0 ];then
  cp -af /etc/codepage /tmp/etc/
  cp -af /etc/fontmap /tmp/etc/
  cp -af /etc/keyboardtype /tmp/etc/
  cp -af /etc/keymap /tmp/etc/
@@ -702,10 +640,14 @@
  cp -af /etc/windowmanager /tmp/etc/
  cp -af /etc/xextraoptions /tmp/etc/
  cp -af /etc/X11/xorg.conf /tmp/etc/X11
  cp -af /etc/network-wizard /tmp/etc/
  cp -af /etc/simple_network_setup/* /tmp/etc/simple_network_setup/
+m_22="$(gettext 'These files were customised in /etc:')
+codepage fontmap keyboardtype keymap mousebuttons mousedevice videomode eth0mode eth1mode resolv.conf localtime TZ cdburnerdevice dvddevice modemdevice securetelnetrc modprobe.d/* rdesktoprc windowmanager xextraoptions X11/xorg.conf
+$(gettext 'Also these directories:')
+network-wizard."
  MSG1="$m_22"
 #else
 # #v431JP remove slmodems
 # rm -f /tmp/etc/init.d/*slmodem*
 fi
@@ -718,12 +660,18 @@
 #100913 fix id-string variable...
 idPATTERN="s%^DISTRO_IDSTRING.*%DISTRO_IDSTRING='${IDSTRING}'%"
 sed -i -e "$idPATTERN" /tmp/etc/DISTRO_SPECS
 cp -f /tmp/etc/DISTRO_SPECS /tmp/DISTRO_SPECSupdated #keep this to put into initrd.gz.
 
-eval m_23=\"$m_23\"
-Xdialog --wrap --left  --title "$m_01" --msgbox "$m_23" 0 0
+m_23="${MSG1}
+
+$(gettext 'If you know what you are doing, you can now modify any files in /tmp/etc folder. This is just about to be added to /etc in the .sfs file.')
+$(gettext "Do anything you want before clicking 'Ok'.")
+$(gettext '(If this program has missed something important, let me know -- Barry Kauler)')
+
+$(eval_gettext "Click 'Ok' to add /etc in \${PUPPYSFS} file...")"
+Xdialog --wrap --left  --title "$m_01" --msgbox "$m_23" 0 80
 
 #120606 in case user just now replaced the /etc directory...
 sync
 if [ -f /tmp/etc/.XLOADED ];then #user replaced the /etc directory
  rm -f /tmp/etc/.XLOADED
@@ -774,29 +722,53 @@
 
 if [ -f $WKGMNTPT/puppylivecdbuild/isolinux.cfg ]; then
  #edit isolinux.cfg...
  ISOLINUXCFG="`cat $WKGMNTPT/puppylivecdbuild/isolinux.cfg`"
  #small tweaks, like acpi=on, ide=nodma...
- eval m_24=\"$m_24\"
- Xdialog --wrap --left  --title "$m_01" --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_24" 0 0
+ m_24="$(gettext 'Almost ready to burn the CD!')
+$(eval_gettext 'All the files that will be burnt to CD are in ${WKGMNTPT}/puppylivecdbuild/.')
+
+$(gettext 'The thing that you may want to do is edit isolinux.cfg. It has this:')
+${ISOLINUXCFG}
+
+$(gettext "'pmedia' parameter is a hint to Puppy what media you are booting Puppy from.")
+$(gettext "'pmedia=cd' means any CD/DVD drive. Other options are:")
+ usbflash usbhd usbcd ataflash atahd atacd atazip scsihd scsicd
+ $(gettext "(where 'ata' means either IDE or SATA interface, i.e. an internal drive)")
+
+$(gettext "'pkeys' is the default keyboard layout. Example: 'pkeys=us'  Choices are:")
+ azerty be-latin1 br-abnt2 br-abnt br-latin1-abnt2 br-latin1-us by cf croat cz de de-latin1 dk dvorak dvorak-l dvorak-r es et fi fr gr hu101 hu il it jp106 lt mk nl no pl pt-latin1 ro ru se sg sk-qwerty sk-qwertz slovene sv-latin1 uk us wangbe
+
+$(gettext "You may also add any kernel parameters. Some PCs require 'acpi=off' to boot properly.")
+
+$(gettext "(If answer 'Yes', an editor will appear, must exit editor before this program will continue)")
+$(gettext "Click 'Yes' button to edit isolinux.cfg...")"
+ Xdialog --wrap --left  --title "$m_01" --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_24" 0 80
  if [ $? -eq 0 ];then
   defaulttexteditor $WKGMNTPT/puppylivecdbuild/isolinux.cfg
  fi
  sync
 fi
 
-eval m_25=\"$m_25\"
-Xdialog --wrap --left  --title "$m_01" --msgbox "$m_25" 0 0
+m_25="$(gettext 'Almost ready to burn the CD!')
+$(eval_gettext 'All the files that will be burnt to CD are in ${WKGMNTPT}/puppylivecdbuild/.')
+
+$(gettext "If you want to add any more files, say extra SFS files, or to edit or modify the files in any way, do it now. Note, if you add an extra SFS file, say 'devx.sfs' then it will be available for use when you boot the new live-CD.")
+
+$(eval_gettext "If you want to make any changes, use ROX-Filer to open \${WKGMNTPT}/puppylivecdbuild/ and do so now, before clicking the 'OK' button.")"
+Xdialog --wrap --left  --title "$m_01" --msgbox "$m_25" 0 80
 sync
 
 BOOTPARM=""
 [ -f $WKGMNTPT/puppylivecdbuild/grldr ] && BOOTPARM="-b grldr"
 [ -f $WKGMNTPT/puppylivecdbuild/isolinux.bin ] && BOOTPARM="-b isolinux.bin -c boot.cat"
 if [ "$BOOTPARM" = "" ]; then
-eval m_25_1=\"$m_25_1\"
-  Xdialog --wrap --left  --title "$m_01" --msgbox "$m_25_1" 0 0
-  exit
+ m_25_1="$(gettext 'No boot loaders found. You need isolinux.bin or grldr to make bootable CD.')
+$(gettext "Click 'OK' to quit.")
+$(eval_gettext '(leaving ${WKGMNTPT}/puppylivecdbuild/ files in existence)')"
+ Xdialog --wrap --left  --title "$m_01" --msgbox "$m_25_1" 0 0
+ exit
 fi
 
 if [ "$NEW" = "yes" ]; then	#120628: no change id-string for reuse
 #100913 append id-string. doesn't matter if already have an id-string appended...
 echo -n "$IDSTRING" >> $WKGMNTPT/puppylivecdbuild/vmlinuz
@@ -822,35 +794,47 @@
 cd /root
 fi #120628 end
 
 #build new iso file, or direct burn to cd...
 #to save space, burn direct from $WKGMNTPT/puppylivecdbuild/ to cd...
-eval m_26=\"$m_26\"
-Xdialog --wrap --left --title "$m_01" --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_26" 0 0
+m_26="$(eval_gettext 'All the files that will be burnt to CD/DVD are in ${WKGMNTPT}/puppylivecdbuild/.')
+
+$(gettext 'As the working partition may have limited space (for example, you are using a USB pen drive), these files are burnt direct to CD/DVD, rather than create an intermediary iso file. If you do need an iso file, you can copy it from the CD afterward:')
+$(eval_gettext '(dd if=/dev/${BURNERDRV} of=puppy.iso seek=0 bs=32k)')
+
+$(gettext "However, if you just want to create an iso file now and not burn to CD/DVD, click the 'No' button.")
+
+$(eval_gettext "Click 'No' button (or close-box on window) to quit program at this point (leaving \${WKGMNTPT}/puppylivecdbuild/ files in existence), and further option to create an iso file...")
+$(gettext "Click 'Yes' button to burn to CD/DVD...")"
+Xdialog --wrap --left --title "$m_01" --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_26" 0 80
 
 if [ ! $? -eq 0 ];then
- MSG="$m_28_2"
- eval m_27=\"$m_27\"
- Xdialog --wrap --left  --title "$m_01" --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_27" 0 0
+ MSG="$(gettext 'ISO file not created.')"
+ m_27="$(eval_gettext "Click 'Yes' button to create a 'custom-puppy.iso' in \${WKGMNTPT}/ (assuming that there is 100MB-300MB free space)...")
+$(eval_gettext "Click 'No' button (or close-box on window) to quit program at this point (leaving  \${WKGMNTPT}/puppylivecdbuild/ files in existence)...")"
+ Xdialog --wrap --left  --title "$m_01" --ok-label "$Yes_lbl" --cancel-label "$No_lbl" --yesno "$m_27" 0 80
  if [ $? -eq 0 ];then
   #cd $WKGMNTPT
   VOLI=""
-  VOLI=$(Xdialog --title "$m_01" --stdout --inputbox "$m_27_1" 0 0 "$SFSBASE")
+  m_27_1="$(gettext 'You can add the CD volume ID, it can be used on Windows and on some Linux system.')"
+  VOLI=$(Xdialog --title "$m_01" --stdout --inputbox "$m_27_1" 0 60 "$SFSBASE")
   [ "$VOLI" != "" ] && VOLI="-V $(echo "$VOLI"|tr ' ' '_')"
+  [ -f $WKGMNTPT/custom-puppy.iso ] && rm -f $WKGMNTPT/custom-puppy.iso #130223
   # Joliet option
   rxvt -bg orange -fg black -title "$m_01" -e mkisofs -J -D -R $VOLI -o $WKGMNTPT/custom-puppy.iso $BOOTPARM -no-emul-boot -boot-load-size 4 -boot-info-table $WKGMNTPT/puppylivecdbuild/
-  eval MSG=\"$m_28_1\"
+  MSG="$(eval_gettext '${WKGMNTPT}/custom-puppy.iso created.')"
  fi
  sync
- eval m_28=\"$m_28\"
+ m_28="$(eval_gettext '${WKGMNTPT}/puppylivecdbuild/ files left in existence.')
+$(gettext "Click 'Ok' button to quit...")"
  Xdialog --wrap --left  --title "$m_01" --msgbox "$MSG
  $m_28" 0 0
  exit
 fi
 
 VIRTUALCD=""
-MSG="$m_34"
+MSG="$(gettext 'You need to choose a burner drive so that the files created by this program can be burnt to a new CD/DVD.')"
 if [ "$BURNERDRV" = "" -o  "$(echo "$BURNERDRV" | grep 'loop')" != "" ]; then
  choice_cdd
 fi
 
 if [ "`echo "$BURNERDRV" | grep 'hd'`" != "" ];then
@@ -858,20 +842,29 @@
 else
  DEVDEV="/dev/$BURNERDRV"
 fi
 
 #now for the actual burn...
-eval m_29=\"$m_29\"
+m_29="$(gettext 'Please choose the media to burn to.')
+$(eval_gettext 'The burner drive is /dev/${BURNERDRV}, and obviously it must be able to burn a DVD if you want to burn a DVD!')
+
+$(gettext "Note, you can later use the 'dd' program to create an iso file:")
+ # dd if=/dev/${BURNERDRV} of=puppy.iso seek=0 bs=32k
+
+$(gettext 'PLEASE INSERT THE NEW CD OR DVD RIGHT NOW, THEN CHOOSE FROM MENU...')"
+m_30="$(gettext 'New blank recordable CD')"
+m_31="$(gettext 'New blank DVD-R (not +R, -RW, +RW)')"
 CDCHOICE="`Xdialog --wrap --left --stdout --title \"$m_01\" --menubox \"$m_29\" 0 0 4 CD-R \"$m_30\" DVD-R \"$m_31\"`"
 
 echo '#!/bin/sh' > /tmp/new2cd.sh
 if [ "`echo "$CDCHOICE" | grep 'DVD'`" = "" ];then
  #burn to CD...
  echo "mkisofs -D -R -quiet $BOOTPARM  -no-emul-boot -boot-load-size 4 -boot-info-table $WKGMNTPT/puppylivecdbuild/ | cdrecord -multi -tao -pad -data -v speed=4 gracetime=2 dev=$DEVDEV  -" >> /tmp/new2cd.sh
 else
  echo "growisofs -speed=4 -Z /dev/$BURNERDRV -R -D -quiet $BOOTPARM -no-emul-boot -boot-load-size 4 -boot-info-table $WKGMNTPT/puppylivecdbuild/" >> /tmp/new2cd.sh
 fi
+m_32="$(gettext 'Finished. Press ENTER key to continue')"
 echo "echo -n \"$m_32\": " >> /tmp/new2cd.sh
 echo 'read nippi'  >> /tmp/new2cd.sh
 chmod 755 /tmp/new2cd.sh
 rxvt -bg orange -fg black -title "$m_01" -e /tmp/new2cd.sh
 
@@ -880,10 +873,18 @@
 rm -rf $WKGMNTPT/puppylivecdbuild
 sync
 umount /dev/$WKGPART
 
 eject /dev/$BURNERDRV
-eval m_33=\"$m_33\"
-Xdialog --wrap --left --title "$m_01" --msgbox "$m_33" 0 0
+m_33="$(gettext 'You should now have a new custom Puppy live-CD!')
+
+$(gettext 'WARNING:')
+$(gettext 'There is a tricky situation here, as all the installed packages (plus anything else that you may have installed, such as loaded .sfs extension files, have all been burnt to CD/DVD).')
+$(eval_gettext 'But, they are still installed in the current ${DISTRO_FILE_PREFIX}save.2fs, the Puppy persistent storage file (where all your stuff gets saved, so it is there next time Puppy is booted).')
+$(gettext "All those files are duplicated, but will that do any harm if you boot the new CD? ...should be okay, but I recommend that you uninstall as much as possible right now, before booting the new CD. Note, do not uninstall them after booting the new CD as that will also 'delete' the packages burnt onto the CD.")
+
+$(eval_gettext "Or, easiest and cleanest option, boot Puppy with 'pfix=ram' boot parameter then at shutdown create a brand new '${DISTRO_FILE_PREFIX}save' file.")
+$(gettext "In fact, this is the wisest thing to do regardless, as you don't even know if the custom CD is going to work properly -- so it is best to bootup in ram only to find out!")" #'geany
+Xdialog --wrap --left --title "$m_01" --msgbox "$m_33" 0 80
 
 
 ####THE END######

Changes to woof-distro/arm/Packages-puppy-armv7-official

@@ -98,14 +98,14 @@
 unclutter-1.09-armv7|unclutter|1.09-armv7||BuildingBlock|24K||unclutter-1.09-armv7.pet||hide mouse pointer when not in use||||
 unclutter_DOC-1.09-armv7|unclutter_DOC|1.09-armv7||BuildingBlock|24K||unclutter_DOC-1.09-armv7.pet||hide mouse pointer when not in use||||
 unionfs_utils-0.2.1-armv7|unionfs_utils|0.2.1-armv7||BuildingBlock|64K||unionfs_utils-0.2.1-armv7.pet|+libuuid|utilities for unionfs layered filesystem||||
 unionfs_utils_DOC-0.2.1-armv7|unionfs_utils_DOC|0.2.1-armv7||BuildingBlock|96K||unionfs_utils_DOC-0.2.1-armv7.pet||utilities for unionfs layered filesystem||||
 usb-modeswitch-1.2.1-armv7|usb-modeswitch|1.2.1-armv7||BuildingBlock|136K||usb-modeswitch-1.2.1-armv7.pet|+jimtcl|hybrid usb device mode switcher, note for best results needs woof 20120109+||||
-util-linux-20130215-armv7|util-linux|20130215-armv7||BuildingBlock|1112K||util-linux-20130215-armv7.pet||linux utilities, cutdown package||||
-util-linux_DEV-20130215-armv7|util-linux_DEV|20130215-armv7||BuildingBlock|2396K||util-linux_DEV-20130215-armv7.pet|+util-linux|linux utilities||||
-util-linux_NLS-20130215-armv7|util-linux_NLS|20130215-armv7||BuildingBlock|4576K||util-linux_NLS-20130215-armv7.pet|+util-linux|linux utilities||||
-util-linux-full-20130215-armv7|util-linux-full|20130215-armv7||BuildingBlock|2436K||util-linux-full-20130215-armv7.pet||linux utilities, the full suite of utilities. do not use this in puppy, will clash with busybox and probably break bootup.|ubuntu|10.04||
+util-linux-2.21.2-patched_f2fs-armv7|util-linux|2.21.2-patched_f2fs-armv7||BuildingBlock|1112K||util-linux-2.21.2-patched_f2fs-armv7.pet||linux utilities, cutdown package||||
+util-linux_DEV-2.21.2-patched_f2fs-armv7|util-linux_DEV|2.21.2-patched_f2fs-armv7||BuildingBlock|1936K||util-linux_DEV-2.21.2-patched_f2fs-armv7.pet|+util-linux|linux utilities||||
+util-linux_NLS-2.21.2-patched_f2fs-armv7|util-linux_NLS|2.21.2-patched_f2fs-armv7||BuildingBlock|4192K||util-linux_NLS-2.21.2-patched_f2fs-armv7.pet|+util-linux|linux utilities||||
+util-linux-full-2.21.2-patched_f2fs-armv7|util-linux-full|2.21.2-patched_f2fs-armv7||BuildingBlock|2016K||util-linux-full-2.21.2-patched_f2fs-armv7.pet||linux utilities. PLEASE DO NOT INSTALL. This is the full set of utilities, it will break Puppy. useful for developers to extract utilities.||||
 viewnior-1.1-armv7|viewnior|1.1-armv7||Graphic|200K||viewnior-1.1-armv7.pet|+gtk+|Elegant Image Viewer||||
 xarchive-0.2.8.6-armv7|xarchive|0.2.8.6-armv7||Setup|212K||xarchive-0.2.8.6-armv7.pet|+gtk+|XArchive archiver||||
 xcur2png-0.7.0-armv7|xcur2png|0.7.0-armv7||BuildingBlock|32K||xcur2png-0.7.0-armv7.pet||convert cursor/mouse-pointer image to png||||
 xcur2png_DOC-0.7.0-armv7|xcur2png_DOC|0.7.0-armv7||BuildingBlock|24K||xcur2png_DOC-0.7.0-armv7.pet||convert X cursor/mouse-pointer to png||||
 xdelta-30p-armv7|xdelta|30p-armv7||BuildingBlock|108K||xdelta-30p-armv7.pet||Opensource binary diff deltadifferential compression tools||||

Changes to woof-distro/x86/Packages-puppy-common-official

@@ -388,12 +388,14 @@
 unclutter-0.8-11|unclutter|0.8-11||BuildingBlock|9K||unclutter-0.8-11.pet||hides cursor when not moving|puppy|4||
 unionfs_utils-0.2.1-q1|unionfs_utils|0.2.1-q1||BuildingBlock|68K||unionfs_utils-0.2.1-q1.pet||unionfs layered filesystem utilities|t2|8.0rc||
 unrar-3.7.8-x86|unrar|3.7.8-x86||Utility|192K||unrar-3.7.8-x86.pet||expand rar archives||||
 urxvtset-0.5|urxvtset|0.5||Desktop|44K||urxvtset-0.5.pet|+yad,+urxvt|UrxvtSet setup terminal emulator||||
 usb-modeswitch-1.2.4-up|usb-modeswitch|1.2.4-up||BuildingBlock|103K||usb-modeswitch-1.2.4-up.pet||mode switcher for hybrid USB devices|ubuntu|precise||
-util-linux-20130215-i486|util-linux|20130215-i486||BuildingBlock|1112K||util-linux-20130215-i486.pet||linux utilities, cutdown package|puppy|wary5||
-util-linux_DEV-20130215-i486|util-linux_DEV|20130215-i486||BuildingBlock|2396K||util-linux_DEV-20130215-i486.pet|+util-linux|linux utilities|puppy|wary5||
+util-linux-2.21.2-patched_f2fs-i486|util-linux|2.21.2-patched_f2fs-i486||BuildingBlock|988K||util-linux-2.21.2-patched_f2fs-i486.pet||linux utilities, cutdown package|puppy|wary5||
+util-linux_DEV-2.21.2-patched_f2fs-i486|util-linux_DEV|2.21.2-patched_f2fs-i486||BuildingBlock|1884K||util-linux_DEV-2.21.2-patched_f2fs-i486.pet|+util-linux|linux utilities|puppy|wary5||
+util-linux_NLS-2.21.2-patched_f2fs-i486|util-linux_NLS|2.21.2-patched_f2fs-i486||BuildingBlock|4192K||util-linux_NLS-2.21.2-patched_f2fs-i486.pet|+util-linux|linux utilities||||
+util-linux-full-2.21.2-patched_f2fs-i486|util-linux-full|2.21.2-patched_f2fs-i486||BuildingBlock|1984K||util-linux-full-2.21.2-patched_f2fs-i486.pet||linux utilities. PLEASE DO NOT INSTALL THIS, puppy uses a cutdown set of utilities, installing the full set will break puppy. useful for developers who might want to extract a utility.|puppy|wary5||
 valide-194-1-uj|valide|194-1-uj||Development|2324K||valide-194-1-uj.pet|+vala|text editor IDE for Vala/Genie coding|ubuntu|jaunty||
 viewnior-1.1|viewnior|1.1||Graphic|200K||viewnior-1.1.pet|+gtk+|Elegant Image Viewer, note compiled in Wary should work in all puppies||||
 viewnior_DOC-1.1|viewnior_DOC|1.1||Graphic|24K||viewnior_DOC-1.1.pet||Simple image viewer||||
 viewnior_NLS-1.1|viewnior_NLS|1.1||Graphic|448K||viewnior_NLS-1.1.pet|+viewnior|Simple image viewer||||
 vobcopy-1.1.1|vobcopy|1.1.1||BuildingBlock|48K||vobcopy-1.1.1.pet|+libdvdread|used for dvd ripping|puppy|4||

Changes to woof-distro/x86/ubuntu/precise/DISTRO_PKGS_SPECS-ubuntu-precise

@@ -735,11 +735,11 @@
 yes|urxvtset||exe| #needs urxvt, yad
 yes|usb-modeswitch||exe
 yes|usb-modeswitch-data||exe
 yes|usbutils|usbutils|exe,dev,doc,nls
 no|util-linux|util-linux,mount|exe,dev,doc,nls| #very suspicious, util-linux-ng 'fdisk' very slow, roll back to old pkg.
-yes|util-linux||exe,dev,doc,nls|pet:common| #latest supports f2fs.
+yes|util-linux||exe,dev,doc,nls|pet:common| #supports f2fs. note, 2.21.2 has f2fs patch, last version supporting losetup encryption.
 yes|vala|valac,valac-0.14,libvala-0.14-0|exe>dev,dev,doc>dev,nls
 yes|valide||exe>dev,dev,doc>dev,nls
 yes|vamps|vamps|exe,dev,doc,nls
 no|vcdimager|vcdimager,libvcdinfo0,libvcdinfo-dev|exe,dev,doc,nls
 yes|vcdimager|vcdimager|exe,dev,doc,nls