Woof: buglets fixed

A few small fixes, see:
http://murga-linux.com/puppy/viewtopic.php?t=77303&start=105

Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/cf31283d88


Posted on 12 May 2012, 9:41


Comments:

Posted on 14 May 2012, 3:31 by K Godt
Me Not
Sorry, sir can't quite remember that there had been dialogs missing in shutdown part .. mentioned by me .. Ehem ..
*

But two tiny things I would like to mention :

Pupsave size choice should check for du /initrd/pup_rw in RAM mode to NOT present a savefile value underneath :

choosesizefunc(){
- local KFREE SIZELIST NUM CHOICES FLABEL SLABEL ACHOICE KSIZE
+ local KFREE SIZELIST NUM CHOICES FLABEL SLABEL ACHOICE KSIZE VALUES VALIDS val
KFREE=$1 ; SIZELIST="" ; NUM=1 ; CHOICES=""
FLABEL="`expr $KFREE \/ 1024`MB"
[ $KFREE -ge 1048576 ] && FLABEL="`dc $KFREE 1048576 \/ p`GB"
- for ACHOICE in 32 64 128 256 512 768 1024 1280 2048 4096
+ VALUES='32 64 128 256 512 768 1024 1280 2048 4096'
+ for val in $VALUES;do
+ [ "$val" -gt "$DU_INITRD_PUP_RW" ] && VALIDS="$VALIDS $val"
+ done
+ for ACHOICE in $VALIDS
do
KSIZE=`expr $ACHOICE \* 1024`
SLABEL="${ACHOICE}MB"
@@ -297,6 +303,7 @@ choosesizefunc(){

Posted here @ shinos PupsaveConfig-2.2.4
in the Projects section :
http://murga-linux.com/puppy/viewtopic.php?p=620340&search_id=1932786929#620340
Which i think is not uninteresting to read, since some got the fuser -k or killzombie to kill rc.shutdown or init and have gotten back to desktop cos bootcount.text was already deleted (Saluki racy 5.2.x)

And second next post :



Posted on 14 May 2012, 3:52 by K Godt
Some save-file mounts seem to mount ro
It should be implemented in rc.shutdown, that if savefile mounting fails to mount read-write but mounts read-only , that at least this gets tested like
128) #1st shutdown, save to ${DISTRO_FILE_PREFIX}save.2fs.


if [ "$CRYPTO" = "" ];then
mount -t $FILEFS -o noatime,rw,loop $SMNTPT$SAVEFILE /tmp/save1stpup
[ $? -ne 0 ] && echo "ERROR: unable to mount /dev/$xPDEV, cannot save." >/dev/console
else


There are several mounting occurrences and one or some even exit with 1 probably without informing
about something like
mount exit code
"64 : some mount succeeded "

*
To handle some idea about mountpoints with spaces
i have implemented th -q|-Q option to /bin/mount script :
 ! "$2" -a "$1" = '-q' ] && { busybox mount |sed "s|\(.*\) \(on\) \(.*\) \(type\) \(.*\) \(.*\)|'\1' \2 '\3' \4 '\5' \6|";exit $?; }

[ ! "$2" -a "$1" = '-Q' ] && { busybox mount |sed -r 's|(.*)( on )(.*)( type )(.*)( \(.*\))|"\1"\2"\3"\4"\5"\6|'; exit $?; }

which should give output like :

# mount -q

'rootfs' on '/' type 'rootfs' (rw)
'/dev/root' on '/' type 'ext4' (rw,relatime,barrier=1,data=ordered)




Posted on 14 May 2012, 10:07 by BarryK
X restarting at shutdown
Karl Godt wrote:

Which i think is not uninteresting to read, since some got the fuser -k or killzombie to kill rc.shutdown or init and have gotten back to desktop cos bootcount.text was already deleted

Woof does not have this problem, as /tmp/* is no longer deleted at shutdown. It is now deleted at bootup, or, later in shutdown if there is a tmpfs mounted on /tmp.



Posted on 14 May 2012, 10:13 by BarryK
minimum size save-file
Karl Godt,
Thanks, patch applied:
http://bkhome.org/blog/?viewDetailed=02831



Posted on 14 May 2012, 10:53 by BarryK
Partitions mounted ro
Karl Godt wrote:

It should be implemented in rc.shutdown, that if savefile mounting fails to mount read-write but mounts read-only , that at least this gets tested

The thing is though, I don't know why it would ever fail to mount rw, unless the save-file was corrupted.

Anyway, I have implemented a test for that.