Compare commits
No commits in common. "94949ba40bc3425dac48d26812d79ef0be1cdd16" and "702c4f28f5f8cee1d08a18557b9793bafb5d2926" have entirely different histories.
94949ba40b
...
702c4f28f5
|
@ -82,9 +82,9 @@ I'm currently not packaging for any distro. If you do, open a PR and add the lin
|
|||
- iptables (or nftables with `iptables-nft` translation linked)
|
||||
- WiFi hotspot dependencies
|
||||
- hostapd
|
||||
- iw (or iwconfig, when iw can not recognize adapter)
|
||||
- iw
|
||||
- iwconfig (you only need this if 'iw' can not recognize your adapter)
|
||||
- haveged (optional)
|
||||
- crda and wireless-regdb (optional)
|
||||
|
||||
|
||||
|
||||
|
|
20
lnxrouter
20
lnxrouter
|
@ -126,8 +126,6 @@ Options:
|
|||
|
||||
Instance managing:
|
||||
--daemon Run in background
|
||||
--keep-confdir Don't delete the temporary config dir after exit
|
||||
|
||||
-l, --list-running Show running instances
|
||||
--lc, --list-clients <id|interface>
|
||||
List clients of an instance. Or list neighbors of
|
||||
|
@ -234,7 +232,6 @@ define_global_variables(){
|
|||
NM_PID=
|
||||
FIREWALLD_PID=
|
||||
TMP_FIREWALLD_ZONE=
|
||||
KEEP_CONFDIR=
|
||||
}
|
||||
|
||||
parse_user_options(){
|
||||
|
@ -511,10 +508,6 @@ parse_user_options(){
|
|||
LIST_CLIENTS_ID="$1"
|
||||
shift
|
||||
;;
|
||||
--keep-confdir)
|
||||
shift
|
||||
KEEP_CONFDIR=1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid parameter: $1" 1>&2
|
||||
|
@ -1337,7 +1330,7 @@ _cleanup() {
|
|||
|
||||
ip addr flush "${SUBNET_IFACE}"
|
||||
|
||||
[[ ! "$KEEP_CONFDIR" -eq 1 ]] && rm -rf "$CONFDIR"
|
||||
rm -rf "$CONFDIR"
|
||||
|
||||
ip link set down dev "${SUBNET_IFACE}"
|
||||
|
||||
|
@ -1373,7 +1366,6 @@ clean_iptables() {
|
|||
|
||||
cleanup() {
|
||||
trap "" SIGINT SIGUSR1 SIGUSR2 EXIT SIGTERM
|
||||
touch "$CONFDIR/exit_$(date +"%Y-%m-%d_%H:%M:%S.%6N")"
|
||||
echo
|
||||
echo
|
||||
echo "Doing cleanup.. "
|
||||
|
@ -1416,14 +1408,12 @@ init_conf_dirs() {
|
|||
cd "$TMPDIR" || die "Couldn't change directory to linux-router's temporary path"
|
||||
|
||||
CONFDIR="$(mktemp -d $TMPDIR/lnxrouter.${TARGET_IFACE}.conf.XXXXXX)" || die "Instance couldn't make config dir" # config dir for one instance
|
||||
echo "Config dir: $CONFDIR"
|
||||
chmod 755 "$CONFDIR" || die "chmod config dir failed"
|
||||
chmod 755 "$CONFDIR"
|
||||
#echo "Config dir: $CONFDIR"
|
||||
echo $$ > "$CONFDIR/pid"
|
||||
|
||||
touch "$CONFDIR/begin_$(date +"%Y-%m-%d_%H:%M:%S.%6N")"
|
||||
|
||||
COMMON_CONFDIR="$TMPDIR/lnxrouter_common.conf" # config dir for all instances
|
||||
mkdir -p "$COMMON_CONFDIR" || die "Failed creating common config dir"
|
||||
mkdir -p "$COMMON_CONFDIR"
|
||||
}
|
||||
|
||||
#== functions to deal with running instances
|
||||
|
@ -1867,8 +1857,6 @@ prepare_wifi_interface() {
|
|||
CHANNEL=36
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Freq band: $FREQ_BAND GHz Channel: $CHANNEL"
|
||||
}
|
||||
|
||||
decide_subnet_interface() {
|
||||
|
|
Loading…
Reference in New Issue