mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
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:
parent
3dd6db4a52
commit
eaed16aeb3
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user