Awful hack to ensure exit status gets propogated in command-line programs
authorJamie Cameron <jcameron@webmin.com>
Sat, 29 Nov 2008 03:59:31 +0000 (03:59 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 29 Nov 2008 03:59:31 +0000 (03:59 +0000)
33 files changed:
mount/config-cobalt-linux
mount/config-coherent-linux
mount/config-corel-linux
mount/config-debian-linux
mount/config-freebsd
mount/config-generic-linux
mount/config-gentoo-linux
mount/config-hpux
mount/config-irix
mount/config-lfs-linux
mount/config-macos
mount/config-mandrake-linux
mount/config-msc-linux
mount/config-netbsd
mount/config-open-linux
mount/config-open-linux-3.1e
mount/config-openbsd
mount/config-openmamba-linux
mount/config-osf1
mount/config-redhat-linux
mount/config-redhat-linux-5.0-6.0
mount/config-redhat-linux-6.1-*
mount/config-slackware-linux
mount/config-sol-linux
mount/config-solaris
mount/config-suse-linux
mount/config-trustix-linux
mount/config-turbo-linux
mount/config-turbo-linux-4.0
mount/config-united-linux
mount/config-unixware
mount/config.info
mount/index.cgi

index 1a1f787..1aef67e 100644 (file)
@@ -2,3 +2,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 4d53400..9aa53aa 100644 (file)
@@ -4,3 +4,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 7f40f1f..3e0aa38 100644 (file)
@@ -3,3 +3,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 4b59e4a..20fdcd0 100644 (file)
@@ -5,3 +5,4 @@ smbclient_path=smbclient
 nmblookup_path=nmblookup
 auto_file=/etc/am-utils/amd.conf
 autofs_file=/etc/auto.master
+show_used=1
index b32419d..5ca156c 100644 (file)
@@ -5,3 +5,4 @@ auto_file=
 smbclient_path=smbclient
 long_fstypes=1
 fstab_file=/etc/fstab
+show_used=1
index 1a1f787..1aef67e 100644 (file)
@@ -2,3 +2,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 71d1058..6b05d71 100644 (file)
@@ -3,3 +3,4 @@ fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
 autofs_file=/etc/autofs/auto.master
+show_used=1
index b32419d..5ca156c 100644 (file)
@@ -5,3 +5,4 @@ auto_file=
 smbclient_path=smbclient
 long_fstypes=1
 fstab_file=/etc/fstab
+show_used=1
index a32967b..9af47cd 100644 (file)
@@ -3,3 +3,4 @@ smbclient_path=/usr/local/samba/bin/smbclient
 long_fstypes=1
 fstab_file=/etc/fstab
 autofs_file=/etc/auto_master
+show_used=1
index 80e4fc9..b8b992d 100644 (file)
@@ -5,3 +5,4 @@ nmblookup_path=
 long_fstypes=1
 smbclient_path=
 fstab_file=/etc/fstab
+show_used=1
index 8b0acd3..727db20 100644 (file)
@@ -4,3 +4,4 @@ browse_server=
 auto_file=
 smbclient_path=smbclient
 long_fstypes=1
+show_used=1
index 4d53400..9aa53aa 100644 (file)
@@ -4,3 +4,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 4d53400..9aa53aa 100644 (file)
@@ -4,3 +4,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index b32419d..5ca156c 100755 (executable)
@@ -5,3 +5,4 @@ auto_file=
 smbclient_path=smbclient
 long_fstypes=1
 fstab_file=/etc/fstab
+show_used=1
index 57f8892..b9c4d6d 100644 (file)
@@ -3,3 +3,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 8399b70..2479498 100644 (file)
@@ -3,3 +3,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index b32419d..5ca156c 100644 (file)
@@ -5,3 +5,4 @@ auto_file=
 smbclient_path=smbclient
 long_fstypes=1
 fstab_file=/etc/fstab
+show_used=1
index 9c5d33e..17cd9b3 100644 (file)
@@ -3,3 +3,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 3fe69c5..2da618a 100644 (file)
@@ -5,3 +5,4 @@ nmblookup_path=/usr/local/samba/bin/nmblookup
 long_fstypes=1
 smbclient_path=/usr/local/samba/bin/smbclient
 fstab_file=/etc/fstab
+show_used=1
index 9c5d33e..17cd9b3 100644 (file)
@@ -3,3 +3,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index b06e671..9177d6d 100644 (file)
@@ -4,3 +4,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 4d53400..9aa53aa 100644 (file)
@@ -4,3 +4,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index c177a36..25069bb 100644 (file)
@@ -2,3 +2,4 @@ fstab_file=/etc/fstab
 long_fstypes=1
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index d919982..a7a8414 100644 (file)
@@ -7,3 +7,4 @@ passwd_pindex=1
 passwd_cindex=2
 passwd_mindex=4
 by_view=0
+show_used=1
index f51c10a..6c20607 100644 (file)
@@ -3,3 +3,4 @@ fstab_file=/etc/vfstab
 long_fstypes=1
 smbclient_path=/usr/local/samba/bin/smbclient
 nmblookup_path=/usr/local/samba/bin/nmblookup
+show_used=1
index 69aceec..288c8bd 100644 (file)
@@ -3,3 +3,4 @@ fstab_file=/etc/fstab
 autofs_file=/etc/auto.master
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 4d53400..9aa53aa 100644 (file)
@@ -4,3 +4,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index b06e671..9177d6d 100644 (file)
@@ -4,3 +4,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index b06e671..9177d6d 100644 (file)
@@ -4,3 +4,4 @@ long_fstypes=1
 fstab_file=/etc/fstab
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index 69aceec..288c8bd 100644 (file)
@@ -3,3 +3,4 @@ fstab_file=/etc/fstab
 autofs_file=/etc/auto.master
 smbclient_path=smbclient
 nmblookup_path=nmblookup
+show_used=1
index f51c10a..6c20607 100644 (file)
@@ -3,3 +3,4 @@ fstab_file=/etc/vfstab
 long_fstypes=1
 smbclient_path=/usr/local/samba/bin/smbclient
 nmblookup_path=/usr/local/samba/bin/nmblookup
+show_used=1
index e12c8e3..134343e 100644 (file)
@@ -2,6 +2,7 @@ line1=Configurable options,11
 browse_server=Server to request browse list from,3,localhost
 long_fstypes=Show long filesystem type names,1,1-Yes,0-No
 sort_mode=Sort filesystems by,1,2-Mount point,1-Type,0-Order in files
+show_used=Show used disk space in filesystems list,1,1-Yes,0-No
 delete_under=Delete directory when un-mounting if under,3,Never delete
 line2=System configuration,11
 fstab_file=File listing filesystems mounted at boot time,0
index c778774..f8d6a4f 100755 (executable)
@@ -50,7 +50,8 @@ if (@visible) {
        print &ui_columns_start([ $text{'index_dir'},
                                $text{'index_type'},
                                $text{'index_dev'},
-                               $text{'index_used'},
+                               $config{'show_used'} ? ( $text{'index_used'} )
+                                                    : ( ),
                                $text{'index_use'},
                                $text{'index_perm'} ], 100);
        foreach $m (@visible) {
@@ -80,14 +81,19 @@ if (@visible) {
                $fsn .= " ($minfo[2])" if (uc($fsn) ne uc($minfo[2]));
                push(@cols, $minfo[2] eq "*" ? $text{'index_auto'} : $fsn);
                push(@cols, &device_name($minfo[1]));
-               ($total, $free) = &disk_space($minfo[2],$minfo[0]);
-               if ($total) {
-                       $pc = int(100*($total-$free) / $total);
-                       push(@cols, $pc >= 99 ? "<font color=red>$pc %</font>" :
-                                   $pc >= 95 ? "<font color=orange>$pc %</font>" : $pc."%");
-                       }
-               else {
-                       push(@cols, "");
+               if ($config{'show_used'}) {
+                       # Add disk space used column
+                       ($total, $free) = &disk_space($minfo[2],$minfo[0]);
+                       if ($total) {
+                               $pc = int(100*($total-$free) / $total);
+                               push(@cols,
+                                $pc >= 99 ? "<font color=red>$pc %</font>" :
+                                $pc >= 95 ? "<font color=orange>$pc %</font>" :
+                                            $pc."%");
+                               }
+                       else {
+                               push(@cols, "");
+                               }
                        }
                if (&can_edit_fs(@minfo)) {
                        push(@cols,