Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

B #174: add support for ALIAS_DETACH #183

Merged
merged 1 commit into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/etc/one-context.d/loc-10-network##apk.one
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,13 @@ EOT

EXTERNAL=$(get_iface_var "EXTERNAL")
EXTERNAL=${EXTERNAL^^}
DETACH=$(get_iface_var "DETACH")

if [ -z "${EXTERNAL}" ] || [ $EXTERNAL = "NO" ]; then
[ -n "${IP}" ] && gen_alias_conf
[ -n "${IP6}" ] && gen_alias6_conf
if [ -z "${DETACH}" ]; then
if [ -z "${EXTERNAL}" ] || [ $EXTERNAL = "NO" ]; then
[ -n "${IP}" ] && gen_alias_conf
[ -n "${IP6}" ] && gen_alias6_conf
fi
fi
done
done
Expand Down
13 changes: 8 additions & 5 deletions src/etc/one-context.d/loc-10-network##bsd.one
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,16 @@ gen_network_configuration()

EXTERNAL=$(get_iface_var "EXTERNAL")
EXTERNAL=${EXTERNAL^^}
DETACH=$(get_iface_var "DETACH")

if [ -z "${EXTERNAL}" ] || [ "$EXTERNAL" = "NO" ]; then
[ -n "${IP}" ] && gen_alias_conf
if [ -z "${DETACH}" ]; then
if [ -z "${EXTERNAL}" ] || [ "$EXTERNAL" = "NO" ]; then
[ -n "${IP}" ] && gen_alias_conf

if [ -n "${IP6}" ]; then
gen_alias6_conf
HAS_IP6=${IP6}
if [ -n "${IP6}" ]; then
gen_alias6_conf
HAS_IP6=${IP6}
fi
fi
fi
done
Expand Down
9 changes: 6 additions & 3 deletions src/etc/one-context.d/loc-10-network##deb.one
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,13 @@ EOT

EXTERNAL=$(get_iface_var "EXTERNAL")
EXTERNAL=${EXTERNAL^^}
DETACH=$(get_iface_var "DETACH")

if [ -z "${EXTERNAL}" ] || [ $EXTERNAL = "NO" ]; then
[ -n "${IP}" ] && gen_alias_conf
[ -n "${IP6}" ] && gen_alias6_conf
if [ -z "${DETACH}" ]; then
if [ -z "${EXTERNAL}" ] || [ $EXTERNAL = "NO" ]; then
[ -n "${IP}" ] && gen_alias_conf
[ -n "${IP6}" ] && gen_alias6_conf
fi
fi
done
done
Expand Down
13 changes: 8 additions & 5 deletions src/etc/one-context.d/loc-10-network##rpm.one
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,16 @@ EOT

EXTERNAL=$(get_iface_var "EXTERNAL")
EXTERNAL=${EXTERNAL^^}
DETACH=$(get_iface_var "DETACH")

if [ -z "${EXTERNAL}" ] || [ "$EXTERNAL" = "NO" ]; then
[ -n "${IP}" ] && gen_alias_conf
[ -n "${IP6}" ] && gen_alias6_conf
if [ -z "${DETACH}" ]; then
if [ -z "${EXTERNAL}" ] || [ "$EXTERNAL" = "NO" ]; then
[ -n "${IP}" ] && gen_alias_conf
[ -n "${IP6}" ] && gen_alias6_conf

if [ -n "${IP}${IP6}" ]; then
ALIAS_NUM=$((ALIAS_NUM + 1))
if [ -n "${IP}${IP6}" ]; then
ALIAS_NUM=$((ALIAS_NUM + 1))
fi
fi
fi
done
Expand Down