Check-in [2a47044e48]
Not logged in

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

Overview

SHA1 Hash:2a47044e48312736d2df5c6ba8686b940311f5e7
Date: 2013-01-28 13:35:24
User: root
Comment:full support for udf filesystem. many scripts edited.

Tags And Properties
Changes

Changes to woof-code/boot/initrd-tree0/init

@@ -132,10 +132,11 @@
 #120217 L18L: export LANGUAGE and OUTPUT_CHARSET.
 #120222 remove setting LANGUAGE. fix if boot param shortened, ex: plang=de
 #120328 could have iso9660 f.s. booting off a usb flash/hard drive (see BootFlash). exclude /dev/sd and /dev/mmc.
 #121102 file DISTRO_SPECS has new variable DISTRO_DB_SUBNAME. ex: for 14.0-based slacko, DISTRO_DB_SUBNAME=slacko14
 #121227 more f.s. drivers as modules, need to load (see also 3builddistro).
+#130128 support udf f.s.
 
 #Unionfs layers setup by this script...
 #unionfs layers:            RW (top)      RO1             RO2              PUPMODE
 #full install, flash drive: tmpfs         PDEV1                            3
 #First boot (or pfix=ram):  tmpfs                         pup_xxx.sfs      5
@@ -319,11 +320,11 @@
  esac
 
  if [ "$PMEDIA" ];then #kernel boot param
   case $PMEDIA in
    cd)
-    [ "$PRAMONLY" = "yes" ] &&  LESSPARTS0="`echo "$LESSPARTS0" | grep 'iso9660'`" #do not search other drives.
+    [ "$PRAMONLY" = "yes" ] &&  LESSPARTS0="`echo "$LESSPARTS0" | grep -E 'iso9660|udf'`" #do not search other drives. 130128 add udf.
    ;;
    *)
     #note: a mistake if have PDEV1 on usb booting, as it can change.
     [ "$PDEV1" ] && LESSPARTS0="`echo "$LESSPARTS0" | grep "${PDEV1}|"`" #kernel boot param.
    ;;
@@ -363,11 +364,11 @@
   echo "ONEDEV=$ONEDEV ONEFS=$ONEFS ONEDRV=$ONEDRV PSUBDIR=$PSUBDIR" >> /tmp/puppy-file-search.log #101127 for debugging.
 
   if [ -d /mnt/data${PSUBDIR} ];then
 
    if [ "$VMLINUZ" = "" ];then #search for kernel.qky and vmlinuz...
-    if [ "$ONEFS" != "iso9660" -a "$PMEDIA" = "cd" ];then #101021 avoid finding vmlinuz on hd. 110204
+    if [ "$ONEFS" != "iso9660" -a "$PMEDIA" = "cd" -a "$ONEFS" != "udf" ];then #101021 avoid finding vmlinuz on hd. 110204. 130128 also udf.
      echo "Bypass looking for vmlinuz on $ONEDEV"
     else
      FND_FILES="`find /mnt/data${PSUBDIR} -maxdepth ${SEARCHDEPTH} -xdev -type f -iname kernel.qky -o -iname ${KERNELNAME} | grep -v ' ' | sed -e 's%^/mnt/data%%' | tr '\n' ' '`"
      for ONEPUPFILE in $FND_FILES  #kernel.qky: see woof script 4quirkybuild.
      do
@@ -697,14 +698,14 @@
 ATAOPTICALDRIVES0="`echo -n "$ATAOPTICALDRIVES" | tr ' ' '\n'`"
 touch /tmp/ALLDRVS0
 [ "$ALLDRVS" ] && echo "$ALLDRVS0" > /tmp/ALLDRVS0 #all drives *except* usb.
 
 PCPARTSALL="`probepart_init -k`"
-PCPARTS0="`echo "$PCPARTSALL" | grep '^/dev/' | cut -f 1-2 -d '|'  | grep -E 'iso9660|ext2|ext3|ext4|reiserfs|msdos|vfat|minix|ntfs' | sed -e 's%/dev/%%'`" #ex: sda1|vfat
+PCPARTS0="`echo "$PCPARTSALL" | grep '^/dev/' | cut -f 1-2 -d '|'  | grep -E 'udf|iso9660|ext2|ext3|ext4|reiserfs|msdos|vfat|minix|ntfs' | sed -e 's%/dev/%%'`" #ex: sda1|vfat 130128 add udf.
 LESSPARTS0="$PCPARTS0"
 #120328 could have iso9660 f.s. booting off a non-optical drive (see BootFlash). exclude /dev/mmc ...
-OPTICALDRIVES0="`echo "$PCPARTS0" | grep 'iso9660' | grep -v '^mmc' | cut -f 1 -d '|'`" #ex: sr0
+OPTICALDRIVES0="`echo "$PCPARTS0" | grep -E 'iso9660|udf' | grep -v '^mmc' | cut -f 1 -d '|'`" #ex: sr0  130128 add udf.
 touch /tmp/OPTICALDRIVES0 #110509 fix for using with grep.
 [ "$OPTICALDRIVES0" != "" ] && echo "$OPTICALDRIVES0" > /tmp/OPTICALDRIVES0 #110509 fix
 
 echo "ALLDRVS=$ALLDRVS " >> /tmp/puppy-file-search.log #for debugging.
 
@@ -761,14 +762,14 @@
  [ -e /proc/ide ] && ALLDRVS="${ALLDRVS}`ls -1 /proc/ide | grep '^hd' | tr '\n' ' '`" #110204 ex: sda sdb sr0 hda
  ALLDRVS0="`echo -n "$ALLDRVS" | tr -s ' ' | tr ' ' '\n'`" #110205
  echo "$ALLDRVS0" > /tmp/ALLDRVS0 #110205
 
  PCPARTSALL="`probepart_init -k`"
- PCPARTS0="`echo "$PCPARTSALL" | grep '^/dev/' | cut -f 1-2 -d '|'  | grep -E 'iso9660|ext2|ext3|ext4|reiserfs|msdos|vfat|minix|ntfs' | sed -e 's%/dev/%%'`" #ex: sda1|vfat
+ PCPARTS0="`echo "$PCPARTSALL" | grep '^/dev/' | cut -f 1-2 -d '|'  | grep -E 'udf|iso9660|ext2|ext3|ext4|reiserfs|msdos|vfat|minix|ntfs' | sed -e 's%/dev/%%'`" #ex: sda1|vfat  130128 add udf.
  LESSPARTS0="$PCPARTS0"
  #120328 could have iso9660 f.s. booting off a usb flash/hard drive (see BootFlash). exclude /dev/sd and /dev/mmc ...
- OPTICALDRIVES0="`echo "$PCPARTS0" | grep 'iso9660' | grep -v -E '^sd|^mmc' | cut -f 1 -d '|'`" #ex: sr0
+ OPTICALDRIVES0="`echo "$PCPARTS0" | grep -E 'iso9660|udf' | grep -v -E '^sd|^mmc' | cut -f 1 -d '|'`" #ex: sr0  130128 add udf.
  touch /tmp/OPTICALDRIVES0 #fix
  [ "$OPTICALDRIVES0" ] && echo "$OPTICALDRIVES0" > /tmp/OPTICALDRIVES0 #fix
  echo "ALLDRVS=$ALLDRVS " >> /tmp/puppy-file-search.log
 
  if [ "$VMLINUZ" = "" -o "$PUPSFS" = "" -o "$SAVEPART" = "" ];then
@@ -1377,10 +1378,11 @@
  pdPATTERN="`echo "$PUPSFSDEV" | sed -e 's/[0-9]*$//'` "
  if [ "$PNOCOPY" != "yes" ];then
   [ "`echo -n "$ATADRIVES" | grep "$pdPATTERN"`" = "" ] && COPYCONTENDER='yes' #test if not fast internal drive.
   [ $PUPMODE -eq 5 ] && COPYCONTENDER='yes'
   [ "$DEV1FS" = "iso9660" ] && COPYCONTENDER='yes'
+  [ "$DEV1FS" = "udf" ] && COPYCONTENDER='yes' #130128
  fi
  [ "$PCOPY" = "yes" ] && COPYCONTENDER='yes'
  [ "$COPYCONTENDER" = "yes" ] && [ $RAMSIZE -gt 220000 ] && [ $RAMSIZE -gt $MINRAM2CPY ] && COPY2RAM="yes"
 
  if [ "$COPY2RAM" = "yes" ];then

Changes to woof-code/boot/initrd-tree0/sbin/probepart_init

@@ -11,10 +11,11 @@
 #110125,110126 brought back /proc/ide /dev/hd* support.
 #111109 replace guess_fstype with blkid (note, blkid very slow, not preferred).
 #120602 kernel 3.2.18 major deviance from earlier kernels, /proc/partitions (and /sys/block) now shows /dev/sr0 when no disk.
 #       new situation, getting duplicate /dev/sr0 so need 'sort -u'.
 #130127 related to 120602, also screen sr0-9 out of /proc/partitions -- this may fix some problems, see main 'probepart'.
+#130128 support 'udf' f.s. also see main 'probepart'.
 
 #***this one runs in initrd, very slightly different from the main one.***
 
 SUNITS="$1" #allowed params are '-k' or '-m'.
 OUTPUT=""
@@ -42,10 +43,11 @@
 ALLDEVS="`echo "${PARTNAMES}
 ${ALLDRVS}" | sort -u | tr '\n' ' '`"
 
 for ONEDEV in $ALLDEVS
 do
+ MEDIATYPE="" #130128
  FSTYPE="unknown"
  DPATTERN=' '${ONEDEV}'$'
  SIZE=`echo "$PARTITIONS" | grep "$DPATTERN" | cut -f 1 -d ' '`
  DEVICE="`echo "$PARTITIONS" | grep "$DPATTERN" | cut -f 2 -d ' '`"
  echo "ONEDEV=${ONEDEV} SIZE=${SIZE} DEVICE=${DEVICE}" >> /tmp/probepart.log #101127 for debugging.
@@ -54,31 +56,29 @@
   #must be a device without partitions...
   SIZE=0
   DEVICE="$ONEDEV"
   case $DEVICE in
    hd*)
-    [ "`cat /proc/ide/$DEVICE/media`" = "cdrom" ] && FSTYPE="iso9660"
+    [ "`cat /proc/ide/$DEVICE/media`" = "cdrom" ] && MEDIATYPE="optical" #130128
    ;;
    scd*|sr*) #usb,sata,scsi cd/dvd drive.
-    FSTYPE="iso9660"
+    MEDIATYPE="optical" #130128
    ;;
   esac
-  #for hd* or sd* superfloppy, determine size...
-  if [ "$FSTYPE" = "unknown" ];then
+  if [ "$MEDIATYPE" != "optical" ];then #130128
+   #for hd* or sd* superfloppy, determine size...
    BSIZE=`disktype /dev/$DEVICE 2>/dev/null | grep '^Block device' | cut -f 2 -d '(' | cut -f 1 -d ' '`
    [ $BSIZE ] && SIZE=$(($BSIZE/1024)) #KB
   fi
  fi
- if [ "$FSTYPE" = "unknown" ];then
-  if [ -f /bin/guess_fstype ];then
-   FSTYPE="`guess_fstype /dev/$DEVICE 2>/dev/null`"
-  else
-   #111109 replace guess_fstype with blkid (note, blkid very slow, not preferred)...
-   FSTYPE="`blkid /dev/$DEVICE 2>/dev/null | grep -o ' TYPE=.*' | cut -f 2 -d '"'`" #'geany
-   [ `echo "$FSTYPE" | wc -l` -gt 1 ] && FSTYPE="unknown" #blkid may fallback to returning all partitions.
-   [ ! "$FSTYPE" ] && FSTYPE="unknown" #paranoid precaution.
-  fi
+ if [ -f /bin/guess_fstype ];then
+  FSTYPE="`guess_fstype /dev/$DEVICE 2>/dev/null`"
+ else
+  #111109 replace guess_fstype with blkid (note, blkid very slow, not preferred)...
+  FSTYPE="`blkid /dev/$DEVICE 2>/dev/null | grep -o ' TYPE=.*' | cut -f 2 -d '"'`" #'geany
+  [ `echo "$FSTYPE" | wc -l` -gt 1 ] && FSTYPE="unknown" #blkid may fallback to returning all partitions.
+  [ ! "$FSTYPE" ] && FSTYPE="unknown" #paranoid precaution.
  fi
  echo "  SIZE=${SIZE} FSTYPE=${FSTYPE}" >> /tmp/probepart.log #101127 for debugging.
 
  #v3.97 guess_fstype fails sometimes...
  #(using makebootfat to setup a USB-FLOPPY/-HDD/-ZIP combined bootable FAT drive).
@@ -88,11 +88,10 @@
   xDEVICE="`echo -n "$DEVICE" | sed -e 's/[0-9]*$//'`" #"${DEVICE/[0-9]/}" #remove partition number.
   xFSTYPE="`fdisk -l /dev/$xDEVICE 2>/dev/null | grep "$fsPATTERN" | head -n 1 | grep -o -E 'FAT12$|FAT16$|FAT32$'`"
   [ "$xFSTYPE" != "" ] && FSTYPE='vfat'
  fi
 
- #for compatibility with old probepart from antonio gallo...
  [ "$FSTYPE" = "unknown" ] && FSTYPE="none"
 
  [ "$SUNITS" = "" ] && SIZE=$(($SIZE*2)) #512 byte blocks.
  [ "$SUNITS" = '-m' ] && SIZE=$(($SIZE/1024)) #MB
 

Changes to woof-code/rootfs-skeleton/etc/rc.d/rc.shutdown

@@ -73,10 +73,11 @@
 #120629 raspberry pi does not have a hw clock. save date here, read at bootup (see rc.country).
 #121104 saving to entire partition, must save /var/local. fixed some text translations.
 #121104 move some code up, to before saving session, as some files were not getting saved in some PUPMODEs.
 #121104 official 'fuser' output format changed, when save to entire partiton 'fuser' kills too much prevents shutdown.
 #121125 umount is a script, this line also unmounts ntfs partition (if mounted) -- which is a bug in script -- use umount-FULL.
+#130128 support udf f.s.
 
 #110923
 . /usr/bin/gettext.sh # enables use of eval_gettext (several named variables) and ngettext (plurals)
 export TEXTDOMAIN=rc.shutdown
 export OUTPUT_CHARSET=UTF-8
@@ -128,10 +129,11 @@
 #puppy.sfs is in a subdirectory, default to saving in it...
 PUPSFSFILE="`echo "$PUPSFS" | cut -f 3 -d ','`"
 PSUBDIR="`dirname "$PUPSFSFILE"`"
 [ "$PSUBDIR" = "/" ] && PSUBDIR=""
 [ $PUPMODE -eq 5 ] && [ "$DEV1FS" = "iso9660" ] && PSUBDIR="" #100920 booting off cd, always default have savefile at /.
+[ $PUPMODE -eq 5 ] && [ "$DEV1FS" = "udf" ] && PSUBDIR=""     #130128 ditto, for udf f.s.
 [ "$DEV1FS" = "msdos" ] && DEV1FS="vfat" #110919
 
 #100920 reverse...
 ##100915 if booting from cd, .sfs's now optionally copied into a subdir, also want save-file in it...
 ## (warning: puppy.sfs on cd must be at /)

Changes to woof-code/rootfs-skeleton/sbin/probepart

@@ -18,19 +18,18 @@
 #120601 jemimah: fallback to use 'blkid' to find f.s. type. 120601 revert use of blkid, too slow.
 #120602 kernel 3.2.18 major deviance from earlier kernels, /proc/partitions (and /sys/block) now shows /dev/sr0 when no disk.
 #       new situation, getting duplicate /dev/sr0 so need 'sort -u'.
 #120516 raspi, guess_fstype fails for ext4 and swap f.s., did detect fat. fallback blkid.
 #120516 sort in old coreutils (as in wary/racy) does not have -V option
-#130127 2.x kernels do not have sr0/sr1 in /proc/partitions, 3.x do, which can upset things. (tested 2.6.32.29 and 3.2.29+, so not sure exact version this difference came in)
+#130127 early kernels do not have sr0/sr1 in /proc/partitions, 3.2+ do, which can upset things. (tested 2.6.32.29 and 3.2.29+, so not sure exact version this difference came in)
+#130128 improve detection of optical: distinguish iso9600, udf. no o/p if no media inserted.
+#       previously, any optical media returned "iso9660", now have "udf" (also for video dvds), "audiocd" (audio cds), "none" (unknown f.s.).
 
 . /etc/rc.d/PUPSTATE
 
 SUNITS="$1" #allowed params are '-k' or '-m'.
 OUTPUT=""
-
-GUESSFSTYPE="`which guess_fstype`"
-[ "$GUESSFSTYPE" = "" ] && GUESSFSTYPE="/usr/lib/mut/bin/guess_fstype" #mut.
 
 if [ -f /root/.usb-drive-log-probepart ];then #force /proc upate mechanism
  for ONEUSBDRV in `cat /root/.usb-drive-log-probepart | tr '\n' ' '`
  do
   #disktype /dev/$ONEUSBDRV > /dev/null 2>&1
@@ -38,11 +37,11 @@
  done
 fi
 
 #devices that have partitions...
 #([^k] is to eliminate mmcblk0 device -- allow mmcblk0p1 etc) v4.01 bugfix eliminate ram...
-#130127 [^kr] screens out sr0-sr9. 2.x kernels do not have these in /proc/partitions, 3.x do, which causes desktop icon to not appear when audio-cd inserted.
+#130127 [^kr] screens out sr0-sr9. early kernels do not have these in /proc/partitions, 3.2+ do, which causes desktop icon to not appear when audio-cd inserted.
 PARTITIONS="`grep '^ .*[^kr][0-9]$' /proc/partitions | tr -s ' ' | cut -f 4-5 -d ' ' | grep -vE ' loop| ram'`" #each line ex: 16076800 sda5
 PARTNAMES="`echo "$PARTITIONS" | cut -f 2 -d ' '`" #120602
 
 #all disk devices...
 #note, /proc/diskstats only updated when a disk accessed, so devs may be missing...
@@ -62,10 +61,11 @@
 ${ALLDRVS}" | sort -V -u | tr '\n' ' '`"
 fi
 
 for ONEDEV in $ALLDEVS
 do
+ MEDIATYPE="" #130128
  FSTYPE="unknown"
  DPATTERN=' '${ONEDEV}'$'
  SIZE=`echo "$PARTITIONS" | grep "$DPATTERN" | cut -f 1 -d ' '`
  DEVICE="`echo "$PARTITIONS" | grep "$DPATTERN" | cut -f 2 -d ' '`"
  if [ ! $SIZE ];then
@@ -73,41 +73,47 @@
   #must be a device without partitions...
   SIZE=0
   DEVICE="$ONEDEV"
   case $DEVICE in
    hd*)
-    [ "`cat /proc/ide/$DEVICE/media`" = "cdrom" ] && FSTYPE="iso9660"
+    [ "`cat /proc/ide/$DEVICE/media`" = "cdrom" ] && MEDIATYPE="optical" #130128
    ;;
    scd*|sr*) #usb,sata,scsi cd/dvd drive.
-    FSTYPE="iso9660"
+    MEDIATYPE="optical" #130128
    ;;
   esac
   if [ -e /sys/block/${DEVICE}/size ];then
    SIZE=`cat /sys/block/${DEVICE}/size`
    SIZE=$(($SIZE/2)) #get KB.
   fi
   #for hd* or sd* superfloppy, determine size (avoid probing optical drive)...
-  if [ "$FSTYPE" = "unknown" -a $SIZE -eq 0 ];then
+  if [ "$MEDIATYPE" = "" -a $SIZE -eq 0 ];then #130128
    BSIZE=`disktype /dev/$DEVICE 2>/dev/null | grep '^Block device' | cut -f 2 -d '(' | cut -f 1 -d ' '`
    [ $BSIZE ] && SIZE=$(($BSIZE/1024)) #KB
   fi
-  #v407 improve f.s. probe for optical...
-  if [ "$FSTYPE" = "iso9660" ];then
+  if [ "$MEDIATYPE" = "optical" ];then #130128
    opticalPATTERN='^/dev/'"$DEVICE"
    if [ "`grep "$opticalPATTERN" /proc/mounts`" = "" ];then
     cddetect_quick -d/dev/${DEVICE} >/dev/null 2>&1 #very fast.
     #...returns 0 if disc inserted, else 255.
-    [ $? -ne 0 ] && FSTYPE="unknown"
+    [ $? -ne 0 ] && continue #130128 go no further, as no media inserted.
    fi
   fi
  fi
- [ "$FSTYPE" = "unknown" ] && FSTYPE="`$GUESSFSTYPE /dev/$DEVICE 2>/dev/null`"
+ FSTYPE="`guess_fstype /dev/$DEVICE 2>/dev/null`" #130128 note, audio-cd returns "unknown", as no f.s.
+
+ if [ "$FSTYPE" = "unknown" -a "$MEDIATYPE" = "optical" ];then #130128 probe optical a bit more.
+  cddetect -q -d/dev/${DEVICE} > /dev/null 2>&1
+  case $? in
+   1) FSTYPE="audiocd" ;;
+  esac
+ fi
 
  #v3.97 guess_fstype fails sometimes...
  #(using makebootfat to setup a USB-FLOPPY/-HDD/-ZIP combined bootable FAT drive).
  xFSTYPE=''
- if [ "$FSTYPE" = "unknown" ];then
+ if [ "$FSTYPE" = "unknown" -a "$MEDIATYPE" = "" ];then #130128 not optical.
   fsPATTERN='^/dev/'"$DEVICE"' '
   xDEVICE="`echo -n "$DEVICE" | sed -e 's/[0-9]*$//' -e 's%p$%%'`" #"${DEVICE/[0-9]/}" #remove partition number. 120516 remove 'p' from mmcblk0p1
   xFSTYPE="`fdisk -l /dev/$xDEVICE 2>/dev/null | grep "$fsPATTERN" | head -n 1 | grep -o -E 'FAT|swap|Linux|NTFS'`" #120516 FAT12$|FAT16$|FAT32$
   case $xFSTYPE in #120516
    FAT) FSTYPE='vfat' ;;
@@ -118,16 +124,11 @@
     [ "$FSTYPE" = "" ] && FSTYPE="unknown"
    ;;
   esac
  fi
 
- #[ "$FSTYPE" = "unknown" ] && FSTYPE="`blkid -c /dev/$DEVICE | grep "$DEVICE"| awk '{print $NF}' |cut -f2 -d\"`" #120601
- #[ "$FSTYPE" = "" ] && FSTYPE="unknown"
-
- #for compatibility with old probepart from antonio gallo...
- [ "$FSTYPE" = "unknown" ] && FSTYPE="none"
- [ "$FSTYPE" = "udf" ] && FSTYPE="iso9660" #120601 jemimah: mount udf as iso9660.
+ [ "$FSTYPE" = "unknown" ] && FSTYPE="none"
 
  [ "$SUNITS" = "" ] && SIZE=$(($SIZE*2)) #want 512 byte blocks.
  [ "$SUNITS" = '-m' ] && SIZE=$(($SIZE/1024)) #want MB
 
  echo "/dev/$DEVICE|$FSTYPE|$SIZE"

Changes to woof-code/rootfs-skeleton/sbin/pup_event_frontend_d

@@ -40,10 +40,11 @@
 #120718 removed /tmp/roxfilerstartupproblem. modify parse /proc/cpuinfo.
 #120829 L18L: need 1 sec for my 1514 MHZ CPU.
 #121105 try increase sleep 1 to 2. see also /usr/sbin/delayedrun.
 #121212 try increase sleep to 3 ...still getting rox-filer crashing.
 #130116 rodin.s: fix one translation, needed LANG set.
+#130128 probepart o/p changed: optical now can be f.s. type 'iso9660', 'udf' (includes video dvds), 'audiocd', or 'none'.
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110513
 
 export TEXTDOMAIN=pup_event_frontend_d
 export OUTPUT_CHARSET=UTF-8
@@ -344,11 +345,11 @@
  #requires global variables DRV_NAME, DRV_CATEGORY, DRV_DESCRIPTION.
  #if a passed param $1, then PROBEPART already known, inefficient to rerun here each time.
  DRVINFO="$DRV_NAME"'|0|0'
  if [ "$ICONPARTITIONS" = "true" ];then
   #display an icon for each partition... w476 add ext4...
-  [ ! $1 ] && PROBEPART="`probepart -k | grep -E '\|ext4\||\|ntfs\||\|msdos\||\|vfat\||\|ext2\||\|ext3\||\|iso9660\||\|xfs\||\|reiser'`"
+  [ ! $1 ] && PROBEPART="`probepart -k | grep -E '\|ext4\||\|ntfs\||\|msdos\||\|vfat\||\|ext2\||\|ext3\||\|iso9660\||\|udf\||\|audiocd\||\|xfs\||\|reiser'`"
   drvPATTERN='^/dev/'"${DRV_NAME}" #important, no space on end!
   DRVINFO="`echo "$PROBEPART" | grep "$drvPATTERN" | cut -f 1,2,3 -d '|' | tr '\n' ' '`"
 
   #w482 k2.6.25.16 /proc/partitions (read by probepart) can be slow to update...
   diCNT=0
@@ -355,11 +356,11 @@
   if [ "`echo -n "$DRV_NAME" | grep -E '^sd|^mmc'`" != "" ];then
    while [ "$DRVINFO" = "" ];do
     diCNT=`expr $diCNT + 1`
     [ $diCNT -gt 3 ] && break
     sleep 1
-    PROBEPART="`probepart -k | grep -E '\|ext4\||\|ntfs\||\|msdos\||\|vfat\||\|ext2\||\|ext3\||\|iso9660\||\|xfs\||\|reiser'`"
+    PROBEPART="`probepart -k | grep -E '\|ext4\||\|ntfs\||\|msdos\||\|vfat\||\|ext2\||\|ext3\||\|iso9660\||\|udf\||\|audiocd\||\|xfs\||\|reiser'`"
     DRVINFO="`echo "$PROBEPART" | grep "$drvPATTERN" | cut -f 1,2,3 -d '|' | tr '\n' ' '`"
    done
   fi
 
  fi
@@ -649,11 +650,11 @@
  DRV_CATEGORY='any' #see pmount.
  DRV_DESCRIPTION="all drives"
  create_icon_func #needs DRV_NAME, DRV_CATEGORY, DRV_DESCRIPTION.
 else
  #show all drives on desktop... w476 add ext4...
- PROBEPART="`probepart -k | grep -E '\|ext4\||\|ntfs\||\|msdos\||\|vfat\||\|ext2\||\|ext3\||\|iso9660\||\|xfs\||\|reiser'`"
+ PROBEPART="`probepart -k | grep -E '\|ext4\||\|ntfs\||\|msdos\||\|vfat\||\|ext2\||\|ext3\||\|iso9660\||\|udf\||\|audiocd\||\|xfs\||\|reiser'`"
  if [ "$FD0ICON" = "true" ];then #see /etc/eventmanager
   if [ -e /sys/block/fd0 ];then
    PROBEDISK="/dev/fd0|floppy|Legacy floppy drive
 $PROBEDISK"
    PROBEPART="/dev/fd0|vfat|1440

Changes to woof-code/rootfs-skeleton/usr/local/bin/drive_all

@@ -32,62 +32,23 @@
 #120110 running as fido, popup password box changes mouse pointer position, need read before run sudo.
 #120129 karl godt: fix ZOMBIES, see http://murga-linux.com/puppy/viewtopic.php?t=71767&start=420. see also rc.shutdown, pmount, pup_event_frontend_d.
 #120323 partial replace 'xmessage' with 'pupmessage'.
 #120516 pup_event_frontend_d may call here when a drive plugged in, fix handling of automounting.
 #120517 syntax error in 120516, quotes needed.
+#130128 convert i18n "technosaurus-method" to gettext.
+#130128 optical media, if has a f.s., can be either iso9660 or udf (see updated probepart and pup_event_frontend_d).
+
+export TEXTDOMAIN=drive_all
+export OUTPUT_CHARSET=UTF-8
+. gettext.sh
 
 [ ! -f /tmp/desktop_drives_curpos ] && getcurpos > /tmp/desktop_drives_curpos #120110
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
 CURPOS="`cat /tmp/desktop_drives_curpos`" #120110
 rm -f /tmp/desktop_drives_curpos #120110
 #CURPOS="`getcurpos`" #110721 get mouse pointer position as soon as possible.
 
-### use pmount.mo
-### also used in /usr/local/bin/drive_all
-m_30="FAILURE! In the case of removable media, the most
-common reason is the media is not currently inserted.
-If so, please remedy."
-m_31="KILL"
-m_32="EXIT"
-m_33="FAILURE!"
-m_34="One or more processes (programs) are currently
-using the partition. Here they are:"
-m_35="If you press the \"${m_31}\" button, Puppy will attempt to
-kill the offending programs for you. Only do this as a
-last resort. "
-m_36="Firstly you should try to close the programs
-manually, so do not press \"${m_31}\"."
-m_37="PLEASE PRESS THE \"${m_32}\" BUTTON!"
-m_38="OK"
-m_39="Remove medium, then press '$m_38'"
-### 50- used only in drive_all
-m_50="Puppy drive manager"
-m_51="/dev/\${ONEDRVNAME} mounted on \${MNTPT}
-is in use by Puppy. You cannot unmount it."
-m_52="NO"
-m_53="Unmount \${ONEDRVNAME}"
-m_54="Unmount all"
-m_55="Do you want to unmount \${ONEDRVNAME}?"
-m_56="It is currently mounted on \${MNTPT}"
-###
-
-# I18N
-LOCALEFILE="pmount.mo"
-# 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 LANG	# need to restart pmount with correct locale
 
 #w002 extracted as a func...
 unmount_func() {
  rox -D $MNTPT
@@ -110,19 +71,25 @@
   umPATTERN="${MNTPT} "
   [ "`busybox mount | grep "$umPATTERN"`" = "" ] && umVAL=0
   if [ $umVAL -ne 0 ];then
    EXTRAMSG0="`fuser -v -m $MNTPT`"
    if [ "$EXTRAMSG0" = "" ];then
-    pupmessage -bg "#ff8080" -title "$m_50: ERROR" -center "$m_30"
+    pupmessage -bg "#ff8080" -title "$(gettext 'Puppy drive manager: ERROR')" -center "$(gettext 'FAILURE! In the case of removable media, the most
+common reason is the media is not currently inserted.
+If so, please remedy.')"
    else
-    xmessage -bg "#ff99ff" -title "$m_01" -center -buttons "$m_31":10,"$m_32":20 "$m_33
-$m_34
-$EXTRAMSG0
-
-$m_35
-$m_36
-$m_37"
+    xmessage -bg "#ff99ff" -title "$(gettext 'Puppy drive manager: FAIL')" -center -buttons "$(gettext 'KILL')":10,"$(gettext 'EXIT')":20 "$(gettext 'FAILURE!')
+$(gettext 'One or more processes (programs) are currently
+using the partition. Here they are:')
+${EXTRAMSG0}
+
+$(gettext "If you press the 'KILL' button, Puppy will attempt to
+kill the offending programs for you. Only do this as a
+last resort.")
+$(gettext "Firstly you should try to close the programs
+manually, so do not press 'KILL'.")
+$(gettext "PLEASE PRESS THE 'EXIT' BUTTON!")"
 
     if [ $? -eq 10 ];then
      fuser -k -m $MNTPT
      continue
     fi
@@ -134,15 +101,15 @@
  done
 }
 
 eject_cd ()
 {
-	eject $1 # && gxmessage  -title "$m_50" -center -buttons "$m_38":0 "$m_39" && eject -t $1
+	eject $1 # && gxmessage  -title "$(gettext 'Puppy drive manager')" -center -buttons "$(gettext 'OK')":0 "$(gettext "Remove medium, then press 'OK'")" && eject -t $1
 }
 
 FSTYPE=""
-[ $2 ] && FSTYPE="$2" #see pup_eventd
+[ $2 ] && FSTYPE="$2" #see pup_event_frontend_d.
 PARAM1=""
 [ $1 ] && PARAM1="$1"
 
 #extract drive name from end of the script name...
 #note, when click on desktop icon, /root/.pup_event/drive_<ONEDRVNAME> is executed,
@@ -214,12 +181,12 @@
  which $PROBEDISK >/dev/null &&  DRV_CATEGORY=$($PROBEDISK|grep "^/dev/$ONEDRVNAME|" | cut -d'|' -f 2)
  echo "$DRV_CATEGORY" | grep '^cd' && DRV_CATEGORY="optical"
  [ "$MNTPT" = "" ] && [ "$DRV_CATEGORY" = "optical" ] && eject_cd /dev/$ONEDRVNAME
  [ "$MNTPT" = "" ] && exit #precaution.
  if [ "$MNTPT" = "/" -o "`echo "$MNTPT" | grep '/initrd/'`" != "" ];then
-  eval m_51=\"$m_51\"
-  pupmessage -bg "#ff8080" -title "$m_50" -center "$m_51"
+  pupmessage -bg "#ff8080" -title "$(gettext 'Puppy drive manager')" -center "$(eval_gettext "/dev/\${ONEDRVNAME} mounted on \${MNTPT}
+is in use by Puppy. You cannot unmount it.")"
   exit
  fi
  unmount_func
  exit
 fi
@@ -355,11 +322,13 @@
     fi
    fi
    ;;
   esac
  fi
- FSTYPE="iso9660"
+ #FSTYPE="iso9660"
+ #130128 probepart now detects udf, FSTYPE should already be set to that...
+ [ "$FSTYPE" != "udf" ] && FSTYPE="iso9660" #would already have been iso9660 anyway.
 fi
 
 #if dropped down here, it is likely to be a data partition...
 
 #120516 pup_event_frontend_d may call here when a drive plugged in, but only passes one parameter (PARAM1). want FSTYPE also...
@@ -400,11 +369,11 @@
     echo $LANG | grep -q -i '\.utf' && NLS_PARAM="$NLS_PARAM,utf8"
     mount -t vfat -o shortname=mixed,quiet${NLS_PARAM} /dev/$xONEDRVNAME /mnt/$xONEDRVNAME #v411
     RETVAL1=$?
     ;;
    #100127 not certain about this (inserted by shinobar)... 100131 shinobar informs needed for cds created in windows...
-   iso9660)
+   iso9660|udf) #130128 add udf.
     mount -t $xFSTYPE -o iocharset=utf8 /dev/$xONEDRVNAME /mnt/$xONEDRVNAME
     RETVAL1=$?
     ;;
    *)
     mount -t $xFSTYPE /dev/$xONEDRVNAME /mnt/$xONEDRVNAME

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

@@ -33,93 +33,29 @@
 #110720 should not open a layer inside aufs, ex: session saved entire partition, desktop drive icon is /initrd/pup_rw.
 #110814 01micko: convert script from gtkdialog2 to gtkdialog3+.
 #120203 preferences was broken.
 #120129 karl godt: fix ZOMBIES, see http://murga-linux.com/puppy/viewtopic.php?t=71767&start=420. see also rc.shutdown, drive_all, pup_event_frontend_d.
 #120323 partial replace 'gxmessage' with 'pupmessage'.
+#130128 convert "technosaurus method" i18n to gettext. mut2 option removed (very old, no longer works properly).
+#130128 fixed for 'udf' f.s. (see also pup_event_frontend_d, drive_all, probepart).
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
+
+export TEXTDOMAIN=pupmount #so as not to clash with 'pmount.mo' used by previous i18n method.
+export OUTPUT_CHARSET=UTF-8
+. gettext.sh
 
 #using ${$} which is pid of script...
 MYPID=${$}
 
 . /etc/rc.d/PUPSTATE #v3.96
 PMOUNT="pmount" #name of this executable.
 MINIFOLDERXPM='/usr/local/lib/X11/mini-icons/mini-filemgr.xpm'
 . /etc/rc.d/functions4puppy4 #v4.02
 
-### pmount.mo
-### also used in /usr/local/bin/drive_all
-m_01="Pmount Puppy Drive Mounter"
-m_02="Please wait, probing hardware..."
-m_03="drive"
-m_04="usbdrv"
-m_05="optical"
-m_06="card"
-m_07="floppy"
-m_08="free"
-m_09="MOUNT"
-m_10="UNMOUNT"
-m_11="preferences"
-m_12="DO NOT REMOVE MOUNTED MEDIA"
-m_13="REFRESH"
-m_14="QUIT"
-m_15="Pmount: choose preferences"
-m_16="The default utilities that Puppy uses to probe the drives are 'probedisk' and 'probepart'. Alternatively, Jesse Liley has developed a utility named 'mut' that has multiple functions including equivalent behaviour to the default utilities. If you find that the default utilities do not detect your drives correctly, then switch over to mut, or vice-versa."
-m_17="Tick box to use 'mut'"
-m_18="If you don't have many drives or partitions, you may find it more convenient to see everything in one window. Untick the box if you want the default tabbed interface, or tick for a single window:"
-m_19="Tick box for single window"
-m_20="If this checkbox is ticked, Pmount will quit immediately after choosing to mount or unmount a partition. If you would refer Pmount to keep running afterward, then untick this box:"
-m_21="Tick for Pmount to quit after mount/unmount"
-m_22="ERROR: unable to mount \$DEVNAME"
-### 30-37 used also in drive_all
-m_30="FAILURE! In the case of removable media, the most
-common reason is the media is not currently inserted.
-If so, please remedy."
-m_31="KILL"
-m_32="EXIT"
-m_33="FAILURE!"
-m_34="One or more processes (programs) are currently
-using the partition. Here they are:"
-m_35="If you press the \"$m_31\" button, Puppy will attempt to
-kill the offending programs for you. Only do this as a
-last resort. "
-m_36="Firstly you should try to close the programs
-manually, so do not press \"$m_31\"."
-m_37="PLEASE PRESS THE \"$m_32\" BUTTON!"
-m_38="OK"
-m_39="Remove medium, then press '$m_38'"
-m_40="CANCEL" #101005
-
-### 50- used only in drive_all
-m_50="Puppy drive manager"
-m_51="/dev/\${ONEDRVNAME} mounted on \${MNTPT}
-is in use by Puppy. You cannot unmount it."
-m_52="NO"
-m_53="Unmount \${ONEDRVNAME}"
-m_54="Unmount all"
-m_55="Do you want to unmount \${ONEDRVNAME}?"
-m_56="It is currently mounted on \${MNTPT}"
-# end of pmount.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
-
-#gxmessage -bg yellow -center -buttons '' -title "$m_01" "$m_02" &
-yaf-splash -bg orange -fg black -close never -fontsize large -text "$m_02" & #110720
+#gxmessage -bg yellow -center -buttons '' -title "Pmount Puppy Drive Mounter" "Please wait, probing hardware..." &
+yaf-splash -bg orange -fg black -close never -fontsize large -text "$(gettext 'Please wait, probing hardware...')" & #110720
 X1PID=$!
 
 #v4.01 passed param, choose which tab to be "on top"...
 TOPTAB=''
 if [ $1 ];then
@@ -130,25 +66,12 @@
  [ "$1" = "sr" ] && TOPTAB="optical"
  [ "$1" = "mm" ] && TOPTAB="card"
  [ "$1" = "fd" ] && TOPTAB="floppy"
 fi
 
-#v3.98...
-HAVEMUT2='no'
-[ -f /usr/sbin/mut ] && [ "`file /usr/sbin/mut | grep 'ELF 32-bit LSB executable'`" != "" ] && HAVEMUT2='yes'
-PMOUNTENGINE='default'
 PROBEPART="probepart"
-PROBEDISK="probedisk2" #v4.01
-ENGINEFLAG='false'
-if [ "$HAVEMUT2" = "yes" ];then
- [ -f /root/.pmountengine ] && PMOUNTENGINE="`cat /root/.pmountengine`"
- if [ "$PMOUNTENGINE" = "mut2" ];then
-  PROBEPART='mut --noserv probepart' #v407
-  PROBEDISK='mut --noserv probedisk2' #v407
-  ENGINEFLAG='true'
- fi
-fi
+PROBEDISK="probedisk"
 
 #v4.01 toggle tabbed interface...
 SINGLEFLAG="false" #default tabbed interface.
 [ -f /root/.pmountsingle ] && SINGLEFLAG="`cat /root/.pmountsingle`"
 
@@ -164,30 +87,18 @@
 
 DISKINFO="`$PROBEDISK | sort -k 2 --field-separator='|'`" #v4.01
 PARTSINFO="`$PROBEPART -k | grep -v 'none' | tr ' ' '_' | tr '\t' '_' | cut -f 1-3 -d '|'`" #v3.98 fix for mut2.
 
 #add floppy drive, if any (note, zip detected by probedisk/probepart)...
-if [ "$PMOUNTENGINE" != "mut2" ];then #v409
- if [ -e /sys/block/fd0 ];then
-  DISKINFO="/dev/fd0|floppy|floppy disk drive
+if [ -e /sys/block/fd0 ];then
+ DISKINFO="/dev/fd0|floppy|floppy disk drive
 $DISKINFO"
-  PARTSINFO="/dev/fd0|vfat|1440
-$PARTSINFO"
- fi
-fi
-#v409 mut2 lets us know if there are any floppy drives.
-if [ "$PMOUNTENGINE" = "mut2" ];then
-  FINDFLOPPY="`echo \"$DISKINFO\" | grep /dev/fd | cut -f 1 -d '|' | tr '\n' ' '`";
-  echo "FINDFLOPPY $FINDFLOPPY"
-  for FDDRIVE in $FINDFLOPPY
-  do
-    PARTSINFO="$FDDRIVE|vfat|1440
-$PARTSINFO"
-  done
+ PARTSINFO="/dev/fd0|vfat|1440
+$PARTSINFO"
 fi
 
-#v4.01 reoganise so that a particular tab is on top...
+#v4.01 reorganise so that a particular tab is on top...
 if [ "$TOPTAB" != "" ];then
  toptabPATTERN='|'"$TOPTAB"'|'
  TOPDISKS="`echo "$DISKINFO" | grep "$toptabPATTERN"`"
  if [ "$TOPDISKS" != "" ];then
   DISKINFO="${TOPDISKS}
@@ -219,11 +130,11 @@
 #probedisk2 has: drive, optical, usbdrv, card, floppy
 TABLIST="`echo -n "$DISKINFO" | cut -f 2 -d '|' | uniq | tr '\n' '|' | sed -e 's/|$//'`"
 CURRENTTAB=''
 
 #v408 v410 moved up...
-VALIDPARTS="`echo "$PARTSINFO" | grep -E 'vfat|msdos|ntfs|minix|ext2|ext3|ext4|reiser|xfs|iso9660'`"
+VALIDPARTS="`echo "$PARTSINFO" | grep -E 'vfat|msdos|ntfs|minix|ext2|ext3|ext4|reiser|xfs|iso9660|udf'`" #130128
 
 #get actual top tab...
 TOPACTUAL="`echo "$TABLIST" | cut -f 1 -d '|'`"
 
 #v4.01 PARTSINFO has to be sorted in same order as the categories in DISKINFO...
@@ -282,12 +193,12 @@
  ONEMNTPT="`mount | grep "$DEVPATTERN" | cut -f 3 -d ' '`"
  [ "$ROOTDEV2" != "" ] && [ "$ROOTDEV2" = "$ONEDEV" ] && ONEMNTPT='/' #v3.96
  if [ "$ONEMNTPT" = "" ];then #not mounted.
   ##[ "$ONEFS" = "iso9660" ] && DRIVEXPM='/usr/local/lib/X11/mini-icons/mini-cd.xpm'
   ##<input file>${DRIVEXPM}</input>
-  PARTSGUI="${PARTSGUI}<hbox><text><label>${DEVNAME} ${ONEFS} ${ONESIZE}</label></text><button><label>$m_09</label><action type=\"exit\">DOMOUNT_${ONEDEV}_${ONEFS}</action></button></hbox>"
-  #PARTSGUI="${PARTSGUI}<hbox><text width-request=\"30\"><label>\"\"</label></text><text width-request=\"130\"><label>${DEVNAME} ${ONEFS} ${ONESIZE}</label></text><text width-request=\"80\"><label>\"\"</label></text><button width-request=\"90\"><label>$m_09</label><action type=\"exit\">DOMOUNT_${ONEDEV}_${ONEFS}</action></button></hbox>" #110208 zigbert
+  PARTSGUI="${PARTSGUI}<hbox><text><label>${DEVNAME} ${ONEFS} ${ONESIZE}</label></text><button><label>$(gettext 'MOUNT')</label><action type=\"exit\">DOMOUNT_${ONEDEV}_${ONEFS}</action></button></hbox>"
+  #PARTSGUI="${PARTSGUI}<hbox><text width-request=\"30\"><label>\"\"</label></text><text width-request=\"130\"><label>${DEVNAME} ${ONEFS} ${ONESIZE}</label></text><text width-request=\"80\"><label>\"\"</label></text><button width-request=\"90\"><label>MOUNT</label><action type=\"exit\">DOMOUNT_${ONEDEV}_${ONEFS}</action></button></hbox>" #110208 zigbert
  else
   #DRIVEXPM='/usr/local/lib/X11/mini-icons/mini-hdisk-green.xpm'
   #[ "$ONEFS" = "iso9660" ] && DRIVEXPM='/usr/local/lib/X11/mini-icons/mini-cd-green.xpm'
   FREEK=`df -k | tr -s ' ' | grep "$DEVPATTERN" | cut -f 4 -d ' '`
   if [ $FREEK -gt 1048576 ];then #1024*1024
@@ -299,12 +210,12 @@
    else
     ONEFREE="`dc $FREEK 1024 \/ p`"
     ONEFREE="`printf "%.1f" $ONEFREE`M"
    fi
   fi
-  FREEINSERT="<text><label>${ONEFREE} $m_08</label></text>"
-  #FREEINSERT="<text width-request=\"80\"><label>${ONEFREE} $m_08</label></text>" #110208 zigbert
+  FREEINSERT="<text><label>${ONEFREE} $(gettext 'free')</label></text>"
+  #FREEINSERT="<text width-request=\"80\"><label>${ONEFREE} free</label></text>" #110208 zigbert
   [ "$ONEFREE" = "0.0M" ] && FREEINSERT=""
   #in some cases prevent unmounting...
   INVISBUT=""
   [ "`echo -n "$ONEMNTPT" | grep '^/initrd'`" -o "$ONEMNTPT" = "/" ] && INVISBUT='<visible>disabled</visible>'
   #v404 unipup, cannot unmount anything mntd in /.mnt...
@@ -327,12 +238,12 @@
     ONEMNTPT="/" #open rox at top of aufs layers.
    ;;
   esac
 
   ##<input file>${DRIVEXPM}</input>
-  PARTSGUI="${PARTSGUI}<hbox><button><input file>${MINIFOLDERXPM}</input><action>rox -d ${ONEMNTPT} &</action></button><text><label>${DEVNAME} ${ONEFS} ${ONESIZE}</label></text>${FREEINSERT}<button><label>$m_10</label>${INVISBUT}<action type=\"exit\">UNMOUNT_${ONEDEV}_${ONEFS}_${ONEMNTPT}</action></button></hbox>"
-  #PARTSGUI="${PARTSGUI}<hbox><button width-request=\"30\"><input file>${MINIFOLDERXPM}</input><action>rox -d ${ONEMNTPT} &</action></button><text width-request=\"130\"><label>${DEVNAME} ${ONEFS} ${ONESIZE}</label></text>${FREEINSERT}<button width-request=\"90\"><label>$m_10</label>${INVISBUT}<action type=\"exit\">UNMOUNT_${ONEDEV}_${ONEFS}_${ONEMNTPT}</action></button></hbox>" #110208 zigbert
+  PARTSGUI="${PARTSGUI}<hbox><button><input file>${MINIFOLDERXPM}</input><action>rox -d ${ONEMNTPT} &</action></button><text><label>${DEVNAME} ${ONEFS} ${ONESIZE}</label></text>${FREEINSERT}<button><label>$(gettext 'UNMOUNT')</label>${INVISBUT}<action type=\"exit\">UNMOUNT_${ONEDEV}_${ONEFS}_${ONEMNTPT}</action></button></hbox>"
+  #PARTSGUI="${PARTSGUI}<hbox><button width-request=\"30\"><input file>${MINIFOLDERXPM}</input><action>rox -d ${ONEMNTPT} &</action></button><text width-request=\"130\"><label>${DEVNAME} ${ONEFS} ${ONESIZE}</label></text>${FREEINSERT}<button width-request=\"90\"><label>UNMOUNT</label>${INVISBUT}<action type=\"exit\">UNMOUNT_${ONEDEV}_${ONEFS}_${ONEMNTPT}</action></button></hbox>" #110208 zigbert
  fi
 done
 ########################################################################
  PARTSGUI="${PARTSGUI}</frame>"
  OLDDISKNAME="$ONEDISKNAME"
@@ -341,41 +252,44 @@
 
 if [ "$TABFLAG" = "on" ];then #v4.01
  PARTSGUI="${PARTSGUI}</vbox>"
 fi
 
-#if [ "$HAVEMUT2" = "yes" ];then
- PREFSBUTTON="
-   <button><label>$m_11</label>
+PREFSBUTTON="
+   <button><label>$(gettext 'preferences')</label>
     <action type=\"exit\">SETPREFS</action>
    </button>"
-#fi
 
 NOTEBOOKHEAD=""
 NOTEBOOKTAIL=""
+m_03="$(gettext 'drive')"
+m_04="$(gettext 'usbdrv')"
+m_05="$(gettext 'optical')"
+m_06="$(gettext 'card')"
+m_07="$(gettext 'floppy')"
 M_TABLIST=$(echo $TABLIST|sed -e "s/drive/$m_03/" -e "s/usbdrv/$m_04/" -e "s/optical/$m_05/" -e "s/card/$m_06/" -e "s/floppy/$m_07/")
 if [ "$SINGLEFLAG" = "false" ];then #default
  NOTEBOOKHEAD="<notebook labels=\"${M_TABLIST}\">"
  NOTEBOOKTAIL="</notebook>"
 fi
 
 export PMOUNTGUI="
-<window title=\"$m_01\" icon-name=\"gtk-harddisk\">
+<window title=\"$(gettext 'Pmount Puppy Drive Mounter')\" icon-name=\"gtk-harddisk\">
  <vbox>
   <text use-markup=\"true\">
-  <label>\"<b>$m_12</b>\"</label></text>
+  <label>\"<b>$(gettext 'DO NOT REMOVE MOUNTED MEDIA')</b>\"</label></text>
 
   ${NOTEBOOKHEAD}
   ${PARTSGUI}
   ${NOTEBOOKTAIL}
 
   <hbox>
    ${PREFSBUTTON}
-   <button><input file stock=\"gtk-refresh\"></input><label>$m_13</label>
+   <button><input file stock=\"gtk-refresh\"></input><label>$(gettext 'REFRESH')</label>
     <action type=\"exit\">REFRESH</action>
    </button>
-   <button><input file stock=\"gtk-quit\"></input><label>$m_14</label></button>
+   <button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
   </hbox>
  </vbox>
 </window>"
 
 echo "$PMOUNTGUI" > /tmp/pmountdlg.txt_${MYPID}
@@ -409,26 +323,18 @@
 
 eval "$RETPARAMS"
 
 [ "$EXIT" = "REFRESH" ] && exec /usr/sbin/$PMOUNT $TOPACTUAL
 
-if [ "$HAVEMUT2" = "yes" ];then #120103
- MUTCHKXML="<checkbox>
-   <label>$m_17</label>
-   <default>${ENGINEFLAG}</default>
-   <variable>NEWENGINEFLAG</variable>
-  </checkbox>"
-else
- MUTCHKXML="<text use-markup=\"true\"><label>\"<i> -- not available, needs 'mut2' package installed</i>\"</label></text>"
-fi
+m_18="$(gettext "If you don't have many drives or partitions, you may find it more convenient to see everything in one window. Untick the box if you want the default tabbed interface, or tick for a single window:")" #'geany
+m_19="$(gettext 'Tick box for single window')"
+m_20="$(gettext 'If this checkbox is ticked, Pmount will quit immediately after choosing to mount or unmount a partition. If you would refer Pmount to keep running afterward, then untick this box:')"
+m_21="$(gettext 'Tick for Pmount to quit after mount/unmount')"
 
 if [ "$EXIT" = "SETPREFS" ];then
- DLGSETENG="<window title=\"$m_15\">
- <vbox>
-  <text><label>$m_16</label></text>
-  ${MUTCHKXML}
-
+ DLGSETENG="<window title=\"$(gettext 'Pmount: choose preferences')\">
+ <vbox>
 
   <text><label>$m_18</label></text>
   <checkbox>
    <label>$m_19</label>
    <default>${SINGLEFLAG}</default>
@@ -441,22 +347,19 @@
    <default>${PMOUNTQUIT}</default>
    <variable>NEWPMOUNTQUIT</variable>
   </checkbox>
 
   <hbox>
-   <button><input file stock=\"gtk-ok\"></input><label>${m_38}</label></button>
-   <button><input file stock=\"gtk-cancel\"></input><label>${m_40}</label></button>
+   <button><input file stock=\"gtk-ok\"></input><label>$(gettext 'OK')</label></button>
+   <button><input file stock=\"gtk-cancel\"></input><label>$(gettext 'CANCEL')</label></button>
   </hbox>
  </vbox>
 </window>
 "
- NEWENGINEFLAG=""
  RETPARAMS="`echo "$DLGSETENG" | gtkdialog4 --stdin`"
  eval "$RETPARAMS"
  if [ "$EXIT" = "OK" ];then
-  [ "$NEWENGINEFLAG" = "true" ] && echo -n "mut2" > /root/.pmountengine
-  [ "$NEWENGINEFLAG" = "false" ] && echo -n "default" > /root/.pmountengine
   echo "$NEWSINGLEFLAG" > /root/.pmountsingle
   echo "$NEWPMOUNTQUIT" > /root/.pmountquit
  fi
  exec /usr/sbin/$PMOUNT $TOPACTUAL
 fi
@@ -483,11 +386,11 @@
    echo $LANG | grep -q -i '\.utf' && NLS_PARAM="$NLS_PARAM,utf8"
    mount -t vfat -o shortname=mixed,quiet$NLS_PARAM $DODEV /mnt/$DEVNAME #v411 added quiet.
    RETVAL1=$?
    ;;
   #100127 not certain about this (inserted by shinobar)... 100131 shinobar informs needed for cds created in windows...
-  iso9660)
+  iso9660|udf) #130128 add udf.
    mount -t $DOFS -o iocharset=utf8 $DODEV /mnt/$DEVNAME
    RETVAL1=$?
    ;;
   *)
    mount -t $DOFS $DODEV /mnt/$DEVNAME
@@ -515,12 +418,11 @@
    usleep 100000
   fi
   #v3.95 -x option to rescan...
   exec rox -x /mnt/$DEVNAME -d /mnt/$DEVNAME #want this window on top.
  else
-  eval m_22=\"$m_22\"
-  pupmessage -bg red -center -title "$m_01" "$m_22"
+  pupmessage -bg red -center -title "$(gettext 'Pmount Puppy Drive Mounter')" "$(eval_gettext "ERROR: unable to mount \$DEVNAME")"
   exec /usr/sbin/$PMOUNT $TOPACTUAL
  fi
 fi
 
 if [ "`echo -n "$EXIT" | grep 'UNMOUNT'`" != "" ];then
@@ -549,19 +451,26 @@
  umPATTERN="${MNTPT} "
  [ "`mount | grep "$umPATTERN"`" = "" ] && umVAL=0
  if [ $umVAL -ne 0 ];then
   EXTRAMSG0="`fuser -v -m $MNTPT`"
   if [ "$EXTRAMSG0" = "" ];then
-   pupmessage -bg "#ff8080" -title "$m_01" -center "$m_30"
+   m_30="$(gettext 'FAILURE! In the case of removable media, the most
+common reason is the media is not currently inserted.
+If so, please remedy.')"
+   pupmessage -bg "#ff8080" -title "$(gettext 'Pmount Puppy Drive Mounter')" -center "$m_30"
   else
-   gxmessage -wrap -bg "#ff99ff" -title "$m_01" -center -buttons "$m_31":10,"$m_32":20 "$m_33
-$m_34
-$EXTRAMSG0
+   gxmessage -wrap -bg "#ff99ff" -title "$(gettext 'Pmount Puppy Drive Mounter')" -center -buttons "$(gettext 'KILL')":10,"$(gettext 'EXIT')":20 "$(gettext 'FAILURE!')
+$(gettext 'One or more processes (programs) are currently
+using the partition. Here they are:')
+${EXTRAMSG0}
 
-$m_35
-$m_36
-$m_37"
+$(gettext "If you press the 'KILL' button, Puppy will attempt to
+kill the offending programs for you. Only do this as a
+last resort.")
+$(gettext "Firstly you should try to close the programs
+manually, so do not press 'KILL'.")
+$(gettext "PLEASE PRESS THE 'EXIT' BUTTON!")"
    [ $? -eq 10 ] && fuser -k -m $MNTPT
   fi
  else
 
   #v4.02 have moved this to /bin/umount...
@@ -583,15 +492,15 @@
   #   icon_unmounted_func $DRVNAME $TOPACTUAL #see functions4puppy4
   #  fi
   # fi
   #fi
 
-  #[ "$DOFS" = "iso9660" ] && eject $DODEV && gxmessage  -title "$m_01" -center -buttons "$m_38":0 "$m_39"
+  #[ "$DOFS" = "iso9660" ] && eject $DODEV && gxmessage  -title "Pmount Puppy Drive Mounter" -center -buttons "OK":0 "Remove media, then press 'OK'"
   if [ "$TOPACTUAL" = "optical" ]  && eject $DODEV ; then
-		gxmessage  -title "$m_01" -center -buttons "$m_38":0 "$m_39"
+		gxmessage  -title "$(gettext 'Pmount Puppy Drive Mounter')" -center -buttons "$(gettext 'OK')":0 "$(gettext "Remove media, then press 'OK'")"
 		[ "$PMOUNTQUIT" = "true" ] &&  eject -t $DODEV
   fi
  fi
  [ "$PMOUNTQUIT" = "false" ] && exec /usr/sbin/$PMOUNT $TOPACTUAL
 fi
 
 ###END###

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

@@ -47,10 +47,11 @@
 #120310 npierce: fix some grep operations.
 #120323 replace 'xmessage' with 'pupmessage'.
 #120329 Xdialog bug --yesno supposed to "yes" "No" buttons, but they are "OK" "Cancel".
 #120823 rerwin: preserve user-modified files in full-install upgrade.
 #121116 LANG extraction was broken.
+#130128 handle 'udf' f.s. (see also pmount, pup_event_frontend_d, drive_all, probepart).
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
 
 export TEXTDOMAIN=puppyinstaller
 export OUTPUT_CHARSET=UTF-8
@@ -86,10 +87,11 @@
  FAT32)    FSTYPE="vfat" ;;
  NTFS)     FSTYPE="ntfs" ;;
  ISO9660)  FSTYPE="iso9660" ;;
  JFS)      FSTYPE="jfs" ;;
  XFS)      FSTYPE="xfs" ;;
+ UDF)      FSTYPE="udf" ;; #130128
  *)        FSTYPE="" ;; #100412
  esac
 }
 
 ispupfunc() { #two params: fstype partition
@@ -436,11 +438,16 @@
 # FINALPMEDIA="`echo -n "$FINALPMEDIA" | sed -e "$substPATTERN"`"
 #fi
 
 DRVINFO="`disktype /dev/$DRVSEL`"
 SUPERFS="" #100207 need extra test on gecko edubook...
-[ "`echo "$DRVINFO" | grep '^Partition 1: '`" = "" ] && SUPERFS="`echo "$DRVINFO" | grep "file system" | grep "^[a-zA-Z]" | tr -s " " | cut -f 1 -d " "`"
+if [ "`echo "$DRVINFO" | grep '^Partition 1: '`" = "" ];then
+ SUPERFS="`echo "$DRVINFO" | grep "file system" | grep "^[a-zA-Z]" | tr -s " " | cut -f 1 -d " "`"
+ #130128 cd/dvd, the f.s. name does not start on 1st column...
+ [ "$SUPERFS" = "" ] && SUPERFS="`echo "$DRVINFO" | grep "file system" | head -n 1 | tr -s " " | cut -f 2 -d " "`"
+ #...hmm, don't think will install to an optical media, but with udf you never know.
+fi
 DRVSIZE="`echo "$DRVINFO" | grep "Block device" | cut -f 2 -d ',' | tr -s " " | cut -f 1-4 -d " "`"
 DRVSIZM="`echo "$DRVSIZE" | cut -f 3 -d " "`"
 [ "`echo "$DRVSIZE" | grep "GiB"`" != "" ] && DRVSIZM="`LANG=C dc $DRVSIZM 1000 \* p`" #120202
 IDRVSIZM="`echo -n "$DRVSIZM" | cut -f 1 -d '.'`" #truncate to integer.
 

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

@@ -12,10 +12,11 @@
 #120224 add slacko support.
 #120323 replace 'xmessage' with 'pupmessage'.
 #120325 add dir for precise sfs's.
 #121025 add case retroprecise.
 #121103 file DISTRO_SPECS now has variable DISTRO_DB_SUBNAME.
+#130128 also exclude udf and audiocd.
 
 export TEXTDOMAIN=sfsget
 export OUTPUT_CHARSET=UTF-8
 
 SFS_FILE=''; SFS_DIR=''
@@ -169,11 +170,11 @@
 fi
 if [ "$DLPART" ];then
  RUNBOOTMGR='yes'
  cd $DLMOUNT
 else
- DLPARTS="`probepart -m | grep -v -E 'none|iso9660|swap' | tr '\n' ' '`"
+ DLPARTS="`probepart -m | grep -v -E 'none|iso9660|swap|udf|audiocd' | tr '\n' ' '`" #130128 also exclude udf and audiocd.
  DLBUTTONS=""
  [ "$DLPARTS" = "" ] && DLBUTTONS="<text use-markup=\"true\"><label>\"<b>$(gettext 'NO PARTITIONS FOUND')</b>\"</label></text>"
  for ONEDLSPEC in $DLPARTS
  do
   DEVNODE="`echo -n "$ONEDLSPEC" | cut -f 1 -d '|' | cut -f 3 -d '/'`"

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

@@ -22,10 +22,11 @@
 #120327 expBOOTDRV needs to be exported to rc.shutdown.
 #120427 01micko: support ext4 in save-file. 120428
 #120512 Karl Godt: some parameters missing from lines 626, 630, 642.
 #120514 Karl Godt: precaution, save-file must be bigger than size used in ram.
 #120823 rerwin: avoid saving personal data if flag set in /etc (by remasterpup2, file /etc/personal_data_save_disabled).
+#130128 support udf f.s. (see also sfsget, puppyinstaller, pmount, pup_event_frontend_d, drive_all, probepart).
 
 if [ ! $DISPLAY ];then
  export LANG=C #110928 console shutdown using 'dialog', disable i18n.
 else
  export OUTPUT_CHARSET=UTF-8
@@ -49,10 +50,11 @@
 #puppy.sfs is in a subdirectory, default to saving in it...
 PUPSFSFILE="`echo "$PUPSFS" | cut -f 3 -d ','`"
 PSUBDIR="`dirname "$PUPSFSFILE"`"
 [ "$PSUBDIR" = "/" ] && PSUBDIR=""
 [ $PUPMODE -eq 5 ] && [ "$DEV1FS" = "iso9660" ] && PSUBDIR="" #100920 booting off cd, always default have savefile at /.
+[ $PUPMODE -eq 5 ] && [ "$DEV1FS" = "udf" ] && PSUBDIR="" #130128 ditto, for udf f.s.
 [ "$DEV1FS" = "msdos" ] && DEV1FS="vfat"
 
 if [ $DISPLAY ];then
  export XDIALOG_HIGH_DIALOG_COMPAT=true #for Xdialog.
  DIALOGEXE="pupdialog"
@@ -639,11 +641,11 @@
    yesno="$T_ms \n\n$T_display \n\n$T_orwait240"
    dialog --colors --title "$T_title" --timeout 240 --no-label "$T_no" --yes-label "$T_save" --yesno "$yesno" 0 0 >/dev/console #120512
   fi
   SAVECHOICE=$?
  ;;
- iso9660)
+ iso9660|udf) #130128
   if [ -f /etc/personal_data_save_disabled ];then #120823 rerwin
    SAVECHOICE=256 #120823 rerwin: do not save - case *) below
   else #120823
    T_iso="`eval_gettext \"You have booted off a live-CD or DVD, and you can now save your personal settings and files to a USB Flash drive or any hard drive partition. The session will be saved as a single file, named '\\\${DISTRO_FILE_PREFIX}save.2fs', which has a ext2 (or ext3) filesystem inside it.
 However, if you have burnt the CD/DVD as multisession (not closed), then sessions can be saved as additional tracks to the CD/DVD -- each saved session will appear on the CD/DVD as a directory with all the saved files in it, not as a single file. \Zb\Z1THIS IS STILL EXPERIMENTAL, AND DOES NOT WORK WITH LAPTOP OPTICAL DRIVES\Zn\ZB\"`"
@@ -680,11 +682,11 @@
  ;;
 esac
 
 if [ $PUPMODE -eq 128 ];then #will be saving session.
  #offer to copy $DISTRO_PUPPYSFS (puppy.sfs) and $DISTRO_ZDRVSFS (zdrv.sfs) etc off the cd...
- if [ "$DEV1FS" = "iso9660" ];then #test if booted off cd.
+ if [ "$DEV1FS" = "iso9660" -o "$DEV1FS" = "udf" ];then #test if booted off cd. 130128
   if [ ! -f ${SMNTPT}/${DISTRO_PUPPYSFS} ];then #see file DISTRO_SPECS, init
    NAMEONLY="`basename $SAVEFILE`"
    T_copytitle="$(gettext 'First shutdown: copy .sfs from CD')"
    T_copy="$(gettext 'COPY')"
    yesno="`eval_gettext \"The CD has '\\\${DISTRO_PUPPYSFS}' and maybe other .sfs files on it. It will speed startup considerably if these are on the hard drive.