/dev/mouse fix in full hd install

Pemasu reported this, here is Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/b5721241f3


Posted on 23 Apr 2012, 8:20


Comments:

Posted on 23 Apr 2012, 20:39 by K Godt
/dev/mouse links to /dev/ possible ?
766	#120423 pemasu: /dev/mouse was missing in full install...

| 767 MOUSELINK="`cat /etc/mousedevice`" #(refer /usr/sbin/input-wizard for examples)
| 768 if [ ! -e /dev/$MOUSELINK ];then #precaution, in case mouse interface is gone (unlikely, being paranoid).
| 769 echo -n "input/mice" > /etc/mousedevice
| 770 ln -snf input/mice /dev/mouse
| 771 fi
| 772 [ ! -e /dev/mouse ] && ln -s $MOUSELINK /dev/mouse


Just curious : What if "$MOUSELINK" is empty ?

Feels that /dev/mouse could be linked to " /dev/ " directory ?


Posted on 23 Apr 2012, 21:25 by BarryK
Re $MOUSELINK
I don't think that /etc/mousedevice will ever be an empty file, but to handle even that eventuality, I have changed the code:

if [ ! -s /etc/mousedevice ];then #120423 change -f to -s test.

echo -n "input/mice" > /etc/mousedevice
ln -snf input/mice /dev/mouse
else
[ "`cat /etc/mousedevice`" = "psaux" ] && echo -n "input/mice" > /etc/mousedevice
fi
#120423 pemasu: /dev/mouse was missing in full install...
MOUSELINK="`cat /etc/mousedevice`" #(refer /usr/sbin/input-wizard for examples)
if [ ! -e /dev/$MOUSELINK ];then #precaution, in case mouse interface is gone (unlikely, being paranoid).
echo -n "input/mice" > /etc/mousedevice
ln -snf input/mice /dev/mouse
fi
[ ! -e /dev/mouse ] && ln -s $MOUSELINK /dev/mouse




Posted on 24 Apr 2012, 2:49 by K Godt
New Busybox out
Looks reasonable to me .. in case of .wh. or whatever caused the whole sound thingies .. Imagine all the posts "Mouse not working after reboot" ..

*

New busybox out ...

Had troubles with any input in X

Just the keyboard layout changer key (R_WIN) could do input into any app (xterm,geany) .

Linked busybox to busybox-1.19.4 and all was well .

Tried the whole down to busybox-1.15.3 and they worked .

Then tried busybox-1.20.0 again and it worked normal ...

FYI




Posted on 26 Apr 2012, 5:59 by 01micko
shutdown ext4
I patched rc.shutdown and shutdownconfig to save to ext4, works with heavy encryption too. I made it dependent on a 3 series kernel for safety in case someone woofs using an older kernel without ext4 support, there are probably better ways to define the condition for this, but it works for my purposes. May need a tidy up of translations, though the change is minimal. I didn't test outside of X.

rc.shutdown..
--- rc.shutdown.orig	2012-04-25 15:35:01.000000000 +1000

+++ rc.shutdown 2012-04-25 23:47:27.000000000 +1000
@@ -394,6 +394,7 @@
echo -n "Mounting ${SAVEFILE}..."
FILEFS="ext3"
[ ! "`echo -n "$SAVEFILE" | grep "2fs"`" = "" ] && FILEFS="ext2"
+ [ ! "`echo -n "$SAVEFILE" | grep "4fs"`" = "" ] && FILEFS="ext4" #120425 01micko

if [ "$CRYPTO" = "" ];then
mount -t $FILEFS -o noatime,rw,loop $SMNTPT$SAVEFILE /tmp/save1stpup





Posted on 26 Apr 2012, 6:00 by 01micko
Shutdown ext4 (cont)
continued...

shutdownconfig...
--- shutdownconfig.orig	2012-04-25 15:35:02.000000000 +1000

+++ shutdownconfig 2012-04-25 18:19:09.000000000 +1000
@@ -326,7 +326,14 @@
T_fsmenu="$(gettext 'Previously, Puppy has only used 'ext2', now there is a choice. Regarding power-failure, note that Puppy will do a f.s. check at next boot so ext2 can recover, however journalled filesystems can recover even without a f.s. check. If in doubt, choose 'ext2'. After making the choice, click OK button...')"
T_ext2="$(gettext 'Maximum storage space, encrypted save-file must use ext2')"
T_ext3="$(gettext 'Journalled f.s., safest if power failure etc.')"
- ${DIALOGEXE} ${BACKGROUNDYELLOW} ${TITLEPARAM} "$T_fstitle" --no-cancel --menu "$T_fsmenu" 0 0 3 ext2 "$T_ext2" ext3 "$T_ext3" >/dev/console 2>/tmp/rc.shutdown_pupsave_fs #110926
+ T_ext4="$(gettext 'Journalled f.s., safest if power failure etc.')"
+ KVER=`uname -r`
+ KMAJVER=${KVER%.*.*}
+ if [ "$KMAJVER" -ge "3" ];then
+ ${DIALOGEXE} ${BACKGROUNDYELLOW} ${TITLEPARAM} "$T_fstitle" --no-cancel --menu "$T_fsmenu" 0 0 3 ext2 "$T_ext2" ext3 "$T_ext4" ext4 "$T_ext4" >/dev/console 2>/tmp/rc.shutdown_pupsave_fs #120425 01micko
+ else
+ ${DIALOGEXE} ${BACKGROUNDYELLOW} ${TITLEPARAM} "$T_fstitle" --no-cancel --menu "$T_fsmenu" 0 0 3 ext2 "$T_ext2" ext3 "$T_ext3" >/dev/console 2>/tmp/rc.shutdown_pupsave_fs #110926
+ fi
SFFS="`cat /tmp/rc.shutdown_pupsave_fs`"
[ "$SFFS" = "" ] && SFFS='ext2'
SFEXTNUM="`echo -n "$SFFS" | cut -c 4`"



Posted on 26 Apr 2012, 24:24 by K Godt
Encryption on ext3/4 works
Though it is not the place for comments about ext3/4 save files :

I have posted about this in cutting edge section,too.

The feature to mount encrypted save files works in ext3/etx4 using the losetup command .

What i am uncertain about is the encryption of the entire save-file content being readable with the dd command .

To simply protect a save file from being mounted without password it works with ext3/ext4
but to prevent to read the save-file i don't know.

I think it is more important to prevent from mounting than from being read by dd and hexdump .