create_ap

create a nat-ed wifi ap
git clone git://git.2f30.org/create_ap
Log | Files | Refs | README | LICENSE

commit 38db906a242b18585bd9fbc5e8892eb7784ffce9
parent 0f5a503c7961a2f165034c34fd6426ca8c291467
Author: Karthik K <hashken.distro@gmail.com>
Date:   Sun, 24 May 2015 18:25:49 +0530

Change switch --list to --list-running

* --list is still supported for backward compatability, but will
  neither have an entry in help output nor will have bash completion
  support

Diffstat:
Mbash_completion | 4++--
Mcreate_ap | 15++++++++++-----
2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/bash_completion b/bash_completion @@ -123,9 +123,9 @@ _create_ap() { ;; --stop) local stop_awk_cmd='$1 ~ /^[0-9]+$/' - opts=$("$1" --list | awk "$stop_awk_cmd") + opts=$("$1" --list-running | awk "$stop_awk_cmd") ;; - --list) + --list-running) # No Options ;; --mkconfig) diff --git a/create_ap b/create_ap @@ -56,8 +56,8 @@ usage() { echo " --daemon Run create_ap in the background" echo " --stop <id> Send stop command to an already running create_ap. For an <id>" echo " you can put the PID of create_ap or the WiFi interface. You can" - echo " get them with --list" - echo " --list Show the create_ap processes that are already running" + echo " get them with --list-running" + echo " --list-running Show the create_ap processes that are already running" echo " --mkconfig <conf_file> Store configs in conf_file" echo " --config <conf_file> Load configs from conf_file" echo @@ -891,7 +891,7 @@ for ((i=0; i<$#; i++)); do fi done -GETOPT_ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","ieee80211n","ht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","daemon","stop:","list","version","psk","no-haveged","mkconfig:","config:" -n "$PROGNAME" -- "$@") +GETOPT_ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","ieee80211n","ht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","daemon","stop:","list","list-running","version","psk","no-haveged","mkconfig:","config:" -n "$PROGNAME" -- "$@") [[ $? -ne 0 ]] && exit 1 eval set -- "$GETOPT_ARGS" @@ -987,6 +987,11 @@ while :; do --list) shift LIST_RUNNING=1 + echo -e "WARN: --list is deprecated. Use --list-running instead.\n" 2>&1 + ;; + --list-running) + shift + LIST_RUNNING=1 ;; --no-haveged) shift @@ -1271,8 +1276,8 @@ echo "Config dir: $CONFDIR" echo "PID: $$" echo $$ > $CONFDIR/pid -# to make --list work from any user, we must give read -# permitions to $CONFDIR and $CONFDIR/pid +# to make --list-running work from any user, we must give read +# permissions to $CONFDIR and $CONFDIR/pid chmod 755 $CONFDIR chmod 444 $CONFDIR/pid