wok-current rev 1893
tazndis: fix dirname error.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Fri Dec 19 23:49:35 2008 +0100 (2008-12-19) |
parents | 840b64d8f454 |
children | 53866bc265e8 |
files | tazndis/stuff/tazndis |
line diff
1.1 --- a/tazndis/stuff/tazndis Fri Dec 19 16:38:04 2008 +0000 1.2 +++ b/tazndis/stuff/tazndis Fri Dec 19 23:49:35 2008 +0100 1.3 @@ -26,7 +26,7 @@ 1.4 #* 1.5 #*/ 1.6 1.7 -$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; 1.8 +$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin"; 1.9 1.10 my $WRAP_PCI_BUS = 5; 1.11 my $WRAP_PCMCIA_BUS = 8; 1.12 @@ -84,13 +84,13 @@ 1.13 exit($res); 1.14 1.15 sub usage() { 1.16 - print "install/manage Windows drivers for ndiswrapper\n\n" . 1.17 + print "install/manage Windows drivers for ndiswrapper kernel module\n\n" . 1.18 "usage: tazndis OPTION\n" . 1.19 "-i inffile install driver described by 'inffile'\n" . 1.20 "-r driver remove 'driver'\n" . 1.21 "-l list installed drivers\n" . 1.22 "-v report version information\n\n" . 1.23 - "If you need more complex operation, you may install ndiswrapper package instead.\n" ; 1.24 + "If you need more complex operation, you may install full ndiswrapper package instead.\n" ; 1.25 } 1.26 1.27 #/* 1.28 @@ -104,11 +104,6 @@ 1.29 return $var; 1.30 } 1.31 1.32 -sub dirname { 1.33 - local $var = $_[0]; 1.34 - $var =~ s#(.*)/.*$#$1#; 1.35 - return $var; 1.36 -} 1.37 1.38 # delete given single tree with no sub directories. 1.39 sub rmtree { 1.40 @@ -213,7 +208,7 @@ 1.41 sub install { 1.42 my $inf = shift; 1.43 chomp($inf); 1.44 - $src_dir = dirname($inf); 1.45 + chop($src_dir = `dirname $inf`); 1.46 $driver_name = lc(basename($inf)); 1.47 1.48 unless ($driver_name =~ s/\.inf$//) { 1.49 @@ -236,6 +231,9 @@ 1.50 parse_mfr(); 1.51 copy_file(basename($inf), basename($inf)); 1.52 create_fuzzy_conf($driver_name); 1.53 + print "Install done. " 1.54 + ."You may add ndiswrapper in LOAD_MODULES to launch your network driver at boot time.\n"; 1.55 + 1.56 return 0; 1.57 } 1.58