gh-131: Fix postinstall ambiguous FreeBSD detection

pull/137/head
Vlastimil Holer 6 years ago
parent 65cbdc43f6
commit 96e621b959
No known key found for this signature in database
GPG Key ID: EB549BADEFD07C53

@ -10,7 +10,9 @@ rm -f /etc/udev/rules.d/70-persistent-net.rules
# Reload udev rules
udevadm control --reload >/dev/null 2>&1 || :
# Enable services
### Enable services ########################################
if which systemctl >/dev/null 2>&1 && \
[ -d /etc/systemd ] && \
[ -f /usr/lib/systemd/system/one-context.service ];
@ -46,14 +48,16 @@ elif which rc-update >/dev/null 2>&1; then
rc-update add "${S}" boot >/dev/null 2>&1
done
elif [ -f /etc/rc.conf ]; then
elif [ -x /bin/freebsd-version ]; then
:
else
echo 'WARNING: Contextualization service not enabled automatically' >&2
fi
# Cleanup network configuration
### Cleanup network configuration ##########################
if [ "${NETWORK}" != 'yes' ]; then
exit
fi
@ -137,9 +141,10 @@ fi
# FreeBSD based distros
#TODO: pfsense paths?
if [ -f /etc/rc.conf ]; then
if [ -x /bin/freebsd-version ]; then
rm -f /etc/rc.conf.d/network /etc/rc.conf.d/routing
if [ -f /etc/rc.conf ]; then
sed -i '' \
-e '/^ifconfig_/d' \
-e '/^route_/d' \
@ -147,3 +152,4 @@ if [ -f /etc/rc.conf ]; then
-e '/^defaultrouter/d' \
/etc/rc.conf
fi
fi

Loading…
Cancel
Save