]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/extrahd/extrahd.pl
core125: Ship syslog changes
[people/pmueller/ipfire-2.x.git] / config / extrahd / extrahd.pl
index 5f623fd1b697aeafc16053847484b41435786d55..3b57e92303ea13d1c74e92d391ce20333b9cb18e 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        #
@@ -48,8 +48,6 @@ close FILE;
 ############################################################################################################################
 ############################################################################################################################
 
-print "$ARGV[0] $ARGV[1]";
-
 if ( "$ARGV[0]" eq "mount" ) {
        system("/bin/cp -f /etc/fstab $fstab");
 
@@ -77,15 +75,18 @@ if ( "$ARGV[0]" eq "mount" ) {
        if ( ! `/bin/mount | /bin/fgrep $ARGV[1]` ) {
                system("/bin/cp -f /etc/fstab $fstab");
                system("/bin/fgrep -v $ARGV[1] <$fstab >/etc/fstab");
-               print "Succesfully umounted $ARGV[1].\n";
+               print "Successfully umounted $ARGV[1].\n";
                exit(0);
        } else {
                print "Can't umount $ARGV[1].\n";
                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";
 }
 
 ############################################################################################################################