mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
33 lines
974 B
Plaintext
33 lines
974 B
Plaintext
echo "Updating /etc/shells"
|
|
cp /etc/shells /etc/shells.bak
|
|
(grep -v /usr/local/etc/rc.initial /etc/shells.bak; \
|
|
echo /usr/local/etc/rc.initial) > /etc/shells
|
|
rm -f /etc/shells.bak
|
|
|
|
echo "Registering root shell"
|
|
pw usermod -n root -s /usr/local/etc/rc.initial
|
|
|
|
echo "Disabling FreeBSD mirror"
|
|
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 <<EOF
|
|
#!/bin/sh
|
|
# OPNsense rc(8) hook was automatically installed:
|
|
if [ -f /root/core/src/etc/rc ]; then /root/core/src/etc/rc; exit 0;
|
|
elif [ -f /usr/local/etc/rc ]; then /usr/local/etc/rc; exit 0; fi
|
|
EOF
|
|
cat /etc/rc.bak >> /etc/rc
|
|
rm -f /etc/rc.bak
|
|
|
|
echo "Writing OPNsense version"
|
|
mkdir -p /usr/local/opnsense/version
|
|
echo "%%REPO_VERSION%%-%%REPO_COMMENT%%" > /usr/local/opnsense/version/opnsense
|
|
|
|
if [ -f /var/run/configd.pid ]; then
|
|
echo "Restarting configd"
|
|
pkill -F /var/run/configd.pid
|
|
/usr/local/opnsense/service/configd.py
|
|
fi
|