pkg: move the automount to /etc/rc so that...

/usr/local/etc/rc is always the latest version.  Issue
popped up again since check_reload_status was replaced.
This commit is contained in:
Franco Fichtner 2015-02-25 08:12:12 +01:00
parent 3dd6db4a52
commit eaed16aeb3
3 changed files with 4 additions and 8 deletions

View File

@ -12,10 +12,11 @@ sed -i "" -e "s/^ enabled: yes$/ enabled: no/" /etc/pkg/FreeBSD.conf
echo "Hooking into /etc/rc"
cp /etc/rc /etc/rc.bak
cat > /etc/rc <<EOG
cat > /etc/rc <<EOF
#!/bin/sh
# OPNsense rc(8) hook was automatically installed:
if [ -d /root/core ]; then /usr/bin/make -C /root/core mount; fi
if [ -f /usr/local/etc/rc ]; then /usr/local/etc/rc; exit 0; fi
EOG
EOF
cat /etc/rc.bak >> /etc/rc
rm -f /etc/rc.bak

View File

@ -9,7 +9,7 @@ rm -f /etc/shells.bak
echo "Unhooking from /etc/rc"
cp /etc/rc /etc/rc.bak
LINES=\$(cat /etc/rc | wc -l)
tail -n \$(expr \${LINES} - 3) /etc/rc.bak > /etc/rc
tail -n \$(expr \${LINES} - 4) /etc/rc.bak > /etc/rc
rm -f /etc/rc.bak
echo "Enabling FreeBSD mirror"

View File

@ -99,11 +99,6 @@ else
fi
fi
# mount repo if available
if [ -d /root/core ]; then
/usr/bin/make -C /root/core mount
fi
# Check to see if a compact flash mountpoint exists
# If it fails to mount then run a fsck -y
if grep -q cf /etc/fstab; then