mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add usage
This commit is contained in:
parent
c47f19b022
commit
743f2d442b
1 changed files with 23 additions and 1 deletions
|
@ -1,4 +1,26 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# archboot-hwsim.sh - setup a test SSID
|
||||
# by Tobias Powalowski <tpowa@archlinux.org>
|
||||
# usage(exitvalue)
|
||||
# outputs a usage message and exits with value
|
||||
APPNAME=$(basename "${0}")
|
||||
|
||||
usage()
|
||||
{
|
||||
echo -e "\033[1mWelcome to \033[34marchboot's\033[0m \033[1mHWSIM:\033[0m"
|
||||
echo -e "\033[1m---------------------------------------\033[0m"
|
||||
echo "Create a simulated wireless SSID for testing purposes with mac80211_hwsim module."
|
||||
echo "- wlan0 will be the AP"
|
||||
echo "- wlan1 will be for STATION mode"
|
||||
echo -e "usage: \033[1m${APPNAME} <SSID>\033[0m"
|
||||
exit "1"
|
||||
}
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
if ! grep -qw mac80211_hwsim /proc/modules; then
|
||||
modprobe mac80211_hwsim
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue