Use cp -n' instead of
[[ ! -f $dest ]] && cp $src $dest'
This commit is contained in:
parent
8f112390b2
commit
f45e224996
14
create_ap
14
create_ap
@ -622,14 +622,14 @@ _cleanup() {
|
|||||||
|
|
||||||
# set old ip_forward
|
# set old ip_forward
|
||||||
if [[ -f $COMMON_CONFDIR/ip_forward ]]; then
|
if [[ -f $COMMON_CONFDIR/ip_forward ]]; then
|
||||||
cp $COMMON_CONFDIR/ip_forward /proc/sys/net/ipv4
|
cp -f $COMMON_CONFDIR/ip_forward /proc/sys/net/ipv4
|
||||||
rm -f $COMMON_CONFDIR/ip_forward
|
rm -f $COMMON_CONFDIR/ip_forward
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set old bridge-nf-call-iptables
|
# set old bridge-nf-call-iptables
|
||||||
if [[ -f $COMMON_CONFDIR/bridge-nf-call-iptables ]]; then
|
if [[ -f $COMMON_CONFDIR/bridge-nf-call-iptables ]]; then
|
||||||
if [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then
|
if [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then
|
||||||
cp $COMMON_CONFDIR/bridge-nf-call-iptables /proc/sys/net/bridge
|
cp -f $COMMON_CONFDIR/bridge-nf-call-iptables /proc/sys/net/bridge
|
||||||
fi
|
fi
|
||||||
rm -f $COMMON_CONFDIR/bridge-nf-call-iptables
|
rm -f $COMMON_CONFDIR/bridge-nf-call-iptables
|
||||||
fi
|
fi
|
||||||
@ -1133,13 +1133,9 @@ chmod 444 $CONFDIR/pid
|
|||||||
COMMON_CONFDIR=/tmp/create_ap.common.conf
|
COMMON_CONFDIR=/tmp/create_ap.common.conf
|
||||||
mkdir -p $COMMON_CONFDIR
|
mkdir -p $COMMON_CONFDIR
|
||||||
|
|
||||||
if [[ ! -f $COMMON_CONFDIR/ip_forward ]]; then
|
cp -n /proc/sys/net/ipv4/ip_forward $COMMON_CONFDIR
|
||||||
cp /proc/sys/net/ipv4/ip_forward $COMMON_CONFDIR
|
if [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then
|
||||||
fi
|
cp -n /proc/sys/net/bridge/bridge-nf-call-iptables $COMMON_CONFDIR
|
||||||
|
|
||||||
if [[ ! -f $COMMON_CONFDIR/bridge-nf-call-iptables ]] &&
|
|
||||||
[[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then
|
|
||||||
cp /proc/sys/net/bridge/bridge-nf-call-iptables $COMMON_CONFDIR
|
|
||||||
fi
|
fi
|
||||||
mutex_unlock
|
mutex_unlock
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user