[PC-BSD Commits] r7766 - pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/resources

svn at pcbsd.org svn at pcbsd.org
Sat Oct 9 06:38:14 PDT 2010


Author: kris
Date: 2010-10-09 06:38:14 -0700 (Sat, 09 Oct 2010)
New Revision: 7766

Modified:
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/resources/umts_stick
Log:

Updated umts_stick with script from Lars, allows GUI to easily send PIN



Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/resources/umts_stick
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/resources/umts_stick	2010-10-09 13:31:32 UTC (rev 7765)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkManager/resources/umts_stick	2010-10-09 13:38:14 UTC (rev 7766)
@@ -29,11 +29,19 @@
 sub send_pin;
 sub usage;
 
-usage if ((@ARGV <= 0) || (@ARGV >= 2));
+usage if ((@ARGV <= 0) || (@ARGV >= 6));
 
-getopts("ahsp", \%options) or usage;
+getopts("ahsp:P:D:", \%options) or usage;
 usage if defined $options{h};
 
+if ($options{D}) {
+	$modem = $options{D};
+}
+
+if ($options{P}) {
+	$pin = $options{P};
+}
+
 open(MODEM, "+<", $modem) or die("can't open modem $modem: $!");
 alarm(10);
 
@@ -45,7 +53,6 @@
 }
 query_pin_status if defined $options{p};
 
-
 close(MODEM) or die "Cannot close modem: $!";
 exit $rc;
 
@@ -120,12 +127,14 @@
 }
 
 sub usage {
-	print "Usage: $0 [-a] [-h] [-s] [-p]\n";
+	print "Usage: $0 [-D <device>] [-P <PIN>] [-a] [-h] [-s] [-p]\n";
 	print "Options:\n";
-	print "    -a     send PIN to device\n";
-	print "    -s     print current provider, connection type and signal quality\n";
-	print "    -p     get current PIN status\n";
-	print "    -h     this help message\n";
+	print "    -D <device>    use <device> for the connection\n";
+	print "    -P <PIN>       use <PIN> to unlock the device\n";
+	print "    -a             send PIN to device\n";
+	print "    -s             print current provider, connection type and signal quality\n";
+	print "    -p             get current PIN status\n";
+	print "    -h             this help message\n";
 	exit -1;
 }
 



More information about the Commits mailing list