X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fextrahd.cgi;h=86b0de5c37e6cfff31d2f87ca064f025bf73ddc7;hb=fe9f7588151c5f98a73f5718cd19b1743ff1d6c2;hp=fa12dbed465ba835922d84a51959a2b8b3cb69b7;hpb=e44dfea3bad0ee92e2645bcd3b1082c7d780b39a;p=people%2Fteissler%2Fipfire-2.x.git diff --git a/html/cgi-bin/extrahd.cgi b/html/cgi-bin/extrahd.cgi index fa12dbed4..86b0de5c3 100644 --- a/html/cgi-bin/extrahd.cgi +++ b/html/cgi-bin/extrahd.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -79,11 +79,11 @@ if ($extrahdsettings{'ACTION'} eq $Lang::tr{'add'}) @deviceline = split( /\;/, $deviceentry ); if ( "$extrahdsettings{'PATH'}" eq "$deviceline[2]" ) { $ok = "false"; - $errormessage = "You can't mount $extrahdsettings{'DEVICE'} to $extrahdsettings{'PATH'}, because there is already a device mounted."; + $errormessage = "$Lang::tr{'extrahd you cant mount'} $extrahdsettings{'DEVICE'} $Lang::tr{'extrahd to'} $extrahdsettings{'PATH'}$Lang::tr{'extrahd because there is already a device mounted'}."; } if ( "$extrahdsettings{'PATH'}" eq "/" ) { $ok = "false"; - $errormessage = "You can't mount $extrahdsettings{'DEVICE'} to root /."; + $errormessage = "$Lang::tr{'extrahd you cant mount'} $extrahdsettings{'DEVICE'} $Lang::tr{'extrahd to root'}."; } } @@ -113,7 +113,7 @@ elsif ($extrahdsettings{'ACTION'} eq $Lang::tr{'delete'}) } close FILE; } else { - $errormessage = "Can't umount $extrahdsettings{'PATH'}. Maybe the device is in use?"; + $errormessage = "$Lang::tr{'extrahd cant umount'} $extrahdsettings{'PATH'}$Lang::tr{'extrahd maybe the device is in use'}?"; } } @@ -143,10 +143,10 @@ END $color=$Header::colourgreen; } print <  - $deviceline[0] - $deviceline[1] - $deviceline[2] +   + $deviceline[0] + $deviceline[1] + $deviceline[2]
@@ -154,7 +154,7 @@ END -
+ END ; } @@ -179,21 +179,26 @@ END foreach $scanentry (sort @scans) { @scanline = split( /\;/, $scanentry ); - print <  - /dev/$scanline[0] - $scanline[1] + # remove wrong entries like usb controller name + if ($scanline[1] ne "\n") + { + print <  + /dev/$scanline[0] + $scanline[1] END ; + + } foreach $partitionentry (sort @partitions) { @partitionline = split( /\;/, $partitionentry ); if ( "$partitionline[0]" eq "$scanline[0]" ) { $size = int($partitionline[1] / 1024); print <$Lang::tr{'size'} $size MB -   -   + $Lang::tr{'size'} $size MB +   +   END ; } @@ -202,28 +207,31 @@ END foreach $partitionentry (sort @partitions) { @partitionline = split( /\;/, $partitionentry ); - if (( "$partitionline[0]" =~ /^$scanline[0]/ ) && !( "$partitionline[2]" == "" )) { + if (( "$partitionline[0]" =~ /^$scanline[0]/ ) && !( "$partitionline[2]" eq "" )) { $size = int($partitionline[1] / 1024); print < - UUID=$partitionline[2] + UUID=$partitionline[2] /dev/$partitionline[0] - $Lang::tr{'size'} $size MB + $Lang::tr{'size'} $size MB - + + - + +END +; END ; @@ -232,7 +240,9 @@ END } print <If your device isn't listed here, you need to install or load the driver.
If you can see your device but no partitions you have to create them first. +   +   + $Lang::tr{'extrahd install or load driver'} END ;