Commit eaed16ae authored by Franco Fichtner's avatar Franco Fichtner

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.
parent 3dd6db4a
...@@ -12,10 +12,11 @@ sed -i "" -e "s/^ enabled: yes$/ enabled: no/" /etc/pkg/FreeBSD.conf ...@@ -12,10 +12,11 @@ sed -i "" -e "s/^ enabled: yes$/ enabled: no/" /etc/pkg/FreeBSD.conf
echo "Hooking into /etc/rc" echo "Hooking into /etc/rc"
cp /etc/rc /etc/rc.bak cp /etc/rc /etc/rc.bak
cat > /etc/rc <<EOG cat > /etc/rc <<EOF
#!/bin/sh #!/bin/sh
# OPNsense rc(8) hook was automatically installed: # 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 if [ -f /usr/local/etc/rc ]; then /usr/local/etc/rc; exit 0; fi
EOG EOF
cat /etc/rc.bak >> /etc/rc cat /etc/rc.bak >> /etc/rc
rm -f /etc/rc.bak rm -f /etc/rc.bak
...@@ -9,7 +9,7 @@ rm -f /etc/shells.bak ...@@ -9,7 +9,7 @@ rm -f /etc/shells.bak
echo "Unhooking from /etc/rc" echo "Unhooking from /etc/rc"
cp /etc/rc /etc/rc.bak cp /etc/rc /etc/rc.bak
LINES=\$(cat /etc/rc | wc -l) 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 rm -f /etc/rc.bak
echo "Enabling FreeBSD mirror" echo "Enabling FreeBSD mirror"
......
...@@ -99,11 +99,6 @@ else ...@@ -99,11 +99,6 @@ else
fi fi
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 # Check to see if a compact flash mountpoint exists
# If it fails to mount then run a fsck -y # If it fails to mount then run a fsck -y
if grep -q cf /etc/fstab; then if grep -q cf /etc/fstab; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment