pmount, drive_all scripts

Shinobar posted upgrades for these scripts to the Quirky 005 feedback thread. They are /usr/sbin/pmount and /usr/local/bin/drive_all.

pmount
There was a report on the 005 feedback thread about the CD tray closing too quickly, that this should have fixed. Also it adds locale support.

drive_all
This is the original of the script that runs when a desktop drive icon is clicked on. Shinobar has made some improvements plus locale support. I had recently modified this script, so had to merge my recent changes with shinobar's script.


Posted on 26 Jan 2010, 21:02


Comments:

Posted on 28 Jan 2010, 15:12 by shinobar
utf8 option on CDs
Thanks Barry for the update of locale support.
As for the 'iocharset=utf8' option, it is needed for CD/DVDs burned by Windows. And it must be harmless for any CD/DVDs.
Please take a concider.


Posted on 29 Jan 2010, 5:44 by WB7ODYFred
Pmount & DF error
I found an error that shows with Pmount and df commands (disk free).

The internal computation of df command must use "sectors, heads, cylinders" instaead of number of sectors. The CFDISK command always shows the MAX number of cylinder, head, trac for the ending Sector Number. I will put up a report on the forum. I found this same error operation in Puppy Linux 3.0

http://home.kendra.com/auto/puppy/cfdisk_complete.tar.gz
Files listing cfdisk output in raw, secotrs, and table format.

Pmount version 4.77 found in dpup 484 beta 3 iso disk.


Posted on 29 Jan 2010, 11:36 by WB7ODYFred
Definitely command DF error
  LInes 208, 209 in /usr/sbin/pmount command

FREEK=`df -k | tr -s ' ' | grep "$DEVPATTERN" | cut -f 4 -d ' '`
if [ $FREEK -gt 1048576 ];then #1024*1024


So the bar command is "df -k "
# mut --noserv probepart

/dev/sr0|iso9660|0|CD-RW CED-8042B 1.07
/dev/sdb1|ext3|20675592|Linux Ext2Fs
/dev/sdb2|swap|530145|Linux Swap
/dev/sdb3|ext3|240975|Linux Ext2Fs
/dev/sdb4|ext3|17655435|Linux Ext2Fs
/dev/sda1|ext3|37061892|Linux Ext2Fs
/dev/sda2|swap|1060290|Linux Swap
/dev/sda3|ext2|979965|Linux Ext2Fs
# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 18239996 3117476 14195976 18% /
shmfs 43880 0 43880 0% /dev/shm
/dev/loop0 127232 127232 0 100% /mnt/+root+dpup-devx-484.sfs
/dev/sdb3 8807648 150888 8209352 2% /mnt/sdb3
/dev/sda3 474472 2318 447655 1% /mnt/sda3
/dev/sdb4 8688924 7463088 784452 90% /mnt/sdb4
# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 18G 3.0G 14G 19% /
/dev/root 18G 3.0G 14G 19% /
shmfs 43M 0 43M 0% /dev/shm
/dev/loop0 125M 125M 0 100% /mnt/+root+dpup-devx-484.sfs
/dev/sdb3 8.4G 148M 7.9G 2% /mnt/sdb3
/dev/sda3 464M 2.3M 438M 1% /mnt/sda3
/dev/sdb4 8.3G 7.2G 767M 91% /mnt/sdb4
#

Notice the /dev/sdb3 entries are wrong. It should be 117MB partition with about 115MG
free space available. So the DF command has some problem calculating from the partition
table.
January 28, 2010

Si now to find the source code for the busybox DF command.


k