]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/extrahd/extrahd.pl
cups: update to 1.4.6.
[people/pmueller/ipfire-2.x.git] / config / extrahd / extrahd.pl
index e4b2a483ab2592dd5ee3d01404a8fa1a02d38d7f..6593ca47dea17030ec73494eca2508aaa525e3d4 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2010  IPFire Team  <info@ipfire.org>                          #
 #                                                                             #
 # 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        #
@@ -57,10 +57,10 @@ if ( "$ARGV[0]" eq "mount" ) {
        {
                @deviceline = split( /\;/, $deviceentry );
                if ( "$ARGV[1]" eq "$deviceline[2]" ) {
-                       print "Insert /dev/$deviceline[0] ($deviceline[1]) --> $deviceline[2] into /etc/fstab!\n";
+                       print "Insert $deviceline[0] ($deviceline[1]) --> $deviceline[2] into /etc/fstab!\n";
                        unless ( -d $deviceline[2] ) { system("/bin/mkdir -p $deviceline[2] && chmod 0777 $deviceline[2]"); }
                        open(FILE, ">>$fstab");
-                       print FILE "/dev/$deviceline[0]\t$deviceline[2]\t$deviceline[1]\tdefaults\t0\t0\n";
+                       print FILE "$deviceline[0]\t$deviceline[2]\t$deviceline[1]\tdefaults\t0\t0\n";
                        close(FILE);
                }
        }
@@ -84,8 +84,11 @@ if ( "$ARGV[0]" eq "mount" ) {
                exit(1);
        }
 
+} elsif ( "$ARGV[0]" eq "scanhd") {
+       system("/usr/local/bin/scanhd $ARGV[1]");
+
 } else {
-       print "Usage: $0 (mount|umount) mountpoint\n";
+       print "Usage: $0 (mount|umount|scanhd) mountpoint\n";
 }
 
 ############################################################################################################################