mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-01-28 01:27:16 +01:00
25 lines
597 B
Bash
25 lines
597 B
Bash
#!/usr/sbin/bash
|
|
# Copyright (C) 2013-2019 iopsys Software Solutions AB
|
|
# Author Mohamed Kallel <mohamed.kallel@pivasoftware.com>
|
|
usage()
|
|
{
|
|
echo "Usage: $0 <strength> <passphrase>"
|
|
echo "<strength> Indicate the WEP KEY strength to generate. Should be 64 or 128"
|
|
echo "<passphrase> Indicate the passphrase used to generate the WEP KEY"
|
|
echo "$0 -h display this help"
|
|
}
|
|
|
|
if [ "_$1" = "-h" ]; then
|
|
usage;
|
|
exit 0;
|
|
fi
|
|
|
|
strength=$1
|
|
passphrase=$2
|
|
|
|
if [ _$strength != "_64" -a _$strength != "_128" ] || [ _$passphrase = "_" ]; then
|
|
usage;
|
|
exit 0;
|
|
fi
|
|
|
|
/usr/sbin/icwmpd -w "$strength" "$passphrase"
|