Commit Graph

153 Commits

Author SHA1 Message Date
oblique
df727ff5fd Use option names for positional arguments instead of ARG[1-4] 2015-05-17 19:10:55 +03:00
oblique
ce8d4c9ee5 All positional arguments are overridden if user pass at least one of them 2015-05-17 19:08:18 +03:00
oblique
92d35c0da3 Fix daemonize infinite loop
If `DAEMONIZE=1' is set in the config file then create_ap tries
to create daemon process all the time. This is done because we were
removing `--daemon' option from the parameters of the daemon process.
We fix this by using an environment variable instead.
2015-05-17 18:44:04 +03:00
oblique
ee69810dc5 Fix typo in CONFIG_OPTS array 2015-05-17 18:42:25 +03:00
Karthik K
583ef73fa1 Support --config option
--config <conf_file> loads configs from conf_file
2015-05-09 13:57:23 +05:30
Karthik K
13569a5a42 Support --mkconfig option
When invoked with --mkconfig <conf_file>, the options are stored in
conf_file and create_ap exits.
2015-05-09 13:57:18 +05:30
Karthik K
3ca3663894 Print descriptive messages for several switches
* Print messages for terminating switches like --list, --stop,
  --fix-unmanaged and --daemon
* Minor change in help string
2015-05-06 22:51:04 +05:30
oblique
3f08801967 Enable /proc/sys/net/ipv4/conf/INTERFACE/forwarding on NAT
Fix #76
2015-05-02 02:25:30 +03:00
oblique
f45e224996 Use cp -n' instead of [[ ! -f $dest ]] && cp $src $dest' 2015-05-02 02:13:33 +03:00
oblique
8f112390b2 Kill haveged only if we are the last create_ap instance 2015-05-02 01:01:33 +03:00
oblique
661a8aa1b7 Fix race-condition on interface creation 2015-05-01 21:39:08 +03:00
oblique
66e8ccc814 Have a common directory for common values/settings
This fix the following bug:

1) Run create_ap instance A
2) Run create_ap instance B
3) Stop instance A

After step 3, /proc/sys/net/ipv4/ip_forward is set back to 0,
so clients of instance B they don't have Internet anymore.
2015-05-01 21:25:49 +03:00
oblique
fee914c359 Remove mutex locking between subprocesses
Bash is not flexible and the recersive mutex lock that was implemented
in the previous commit is full of undefined behaviors if piping is
used. We don't actually need to lock between subprocesses so with
this commit we lock only between other create_ap process.
2015-05-01 21:14:54 +03:00
oblique
4ea5d02193 Implement recursive mutex that works across processes/threads 2015-04-26 16:32:42 +03:00
oblique
cafef2e185 Make all function variables local 2015-04-17 22:35:58 +03:00
oblique
bddf2dd0e8 Merge pull request #66 from hashken/bash_completion
Add bash completion
2015-04-16 22:12:23 +03:00
Karthik K
e828664edd bash_completion: Bug fixes and improvements
* Correct switch --ieee80211 to --ieee80211n
* Correct switch -p to -g
* Get list of valid channels from iw list
* Add country code 00
* Get completion for --stop switch from output of --list
2015-04-16 23:13:36 +05:30
Karthik K
8a96c7f9cb Add extended bash completion for all switches 2015-04-16 22:39:46 +05:30
Karthik K
9c24f50dee Add new file that provides bash completion routine 2015-04-16 22:39:46 +05:30
oblique
27c39948ca Make --list to work from any user 2015-04-16 19:49:15 +03:00
oblique
81f5a65c0b Merge pull request #67 from hashken/help_error_code
Ensure error code is 0 when --help is invoked
2015-04-12 17:33:47 +03:00
oblique
f8ebf4ae27 Merge pull request #68 from hashken/progname_optimize
Invoke basename only once to obtain script name
2015-04-12 17:33:31 +03:00
Karthik K
795bb14a38 Invoke basename only once to obtain script name
Minor optimization that ensures basename is not invoked multiple times.
2015-04-12 19:44:42 +05:30
Karthik K
bec82aa65e Ensure error code is 0 when --help is invoked 2015-04-12 19:38:08 +05:30
oblique
1ec0780599 Masquerade only AP subnet 2015-04-05 19:58:07 +03:00
oblique
4d654b76a1 Load nf_nat_pptp module if it exists
This will enable clients to establish PPTP connections.
2015-04-01 23:50:57 +03:00
oblique
56b155304c Merge pull request #64 from hashken/help_stdout
Redirect --help output to stdout instead of stderr
2015-03-28 21:01:33 +02:00
Karthik K
fbeb5c918a Redirect --help output to stdout instead of stderr 2015-03-28 18:37:07 +05:30
oblique
d0a013eaf8 Check every 2 seconds if haveged is needed 2015-03-25 01:23:08 +02:00
oblique
d55adb7d50 Add version number, v0.1 2015-03-13 19:55:20 +02:00
oblique
04fa4860d1 Use `-w 2' with rtl* drivers 2015-03-04 23:56:11 +02:00
oblique
b750e70de6 Add instructions for Realtek adapters 2015-03-04 23:56:11 +02:00
oblique
f06e24721a Use ip' instead of brctl'
This removes bridge-utils from dependencies.
2015-02-22 22:01:31 +02:00
oblique
796c420589 check if bridge-nf-call-iptables exists before we use it 2015-02-22 22:01:31 +02:00
oblique
9ecb40eb6d quote string in [[ -n $str ]] 2015-02-22 22:01:25 +02:00
oblique
ac33c5b169 hide all error messages from cleanup function 2015-02-22 21:40:40 +02:00
oblique
3460580ce2 Detect if --driver=rtl871xdrv is needed 2015-02-14 16:58:58 +02:00
oblique
9dce88aee9 Add emacs file variables 2014-12-15 21:13:57 +02:00
oblique
362bbda3f5 Run clean_exit instead of die on SIGINT/SIGUSR1 2014-12-15 21:09:34 +02:00
oblique
d8c85b460a Add --daemon 2014-12-14 15:59:40 +02:00
oblique
a1c6c411d3 Send USR1 instead of INT in send_stop()
If create_ap is not attached on a tty, then kill -INT does not
work. Use -USR1 instead.
2014-12-14 15:55:25 +02:00
oblique
1c89b44056 Add --stop and --list 2014-12-11 22:13:00 +02:00
oblique
48beb35b64 Handle SIGINT sent by kill 2014-12-11 21:31:25 +02:00
oblique
814ddf9100 Add --mac option 2014-11-23 19:06:57 +02:00
oblique
70b538be7c README.md: update infos about Gentoo installation
Fix #55
2014-11-11 08:03:32 +02:00
oblique
5cbe80f9c4 Set beacon interval to 100ms
Fix #53
2014-11-08 16:50:28 +02:00
oblique
f831ad98d6 Add support for 5GHz frequency band
Close #52
2014-11-03 23:23:32 +02:00
oblique
309e8e353b Add --country option
Close #42
2014-11-02 13:19:25 +02:00
oblique
678053994e nmcli arguments was changed in version 0.9.9 not 0.9.10
Fix #51
2014-10-10 00:21:30 +03:00
oblique
b49f48a4e2 Add --fix-unmanaged option 2014-10-09 20:52:39 +03:00