core/pkg/+PRE_DEINSTALL
Franco Fichtner 797b0e64b8 src: migrate the version file to a new home
We now use /usr/local/opnsense/version/xxx as our version database.
Apart from the core package, opnsense-update(8) also puts its own
version information in there.  To stay somewhat consistent, the
version file should resemble the package name, even though that
looks strange in our case: /usr/local/opnsense/version/opnsense.
It's just that /usr/local/etc is too open and might clash with
other things in the future.
2015-03-02 09:08:44 +01:00

19 lines
492 B
Plaintext

echo "Resetting root shell"
pw usermod -n root -s /bin/csh
echo "Updating /etc/shells"
cp /etc/shells /etc/shells.bak
(grep -v /usr/local/etc/rc.initial /etc/shells.bak) > /etc/shells
rm -f /etc/shells.bak
echo "Unhooking from /etc/rc"
cp /etc/rc /etc/rc.bak
tail -n +5 /etc/rc.bak > /etc/rc
rm -f /etc/rc.bak
echo "Enabling FreeBSD mirror"
sed -i "" -e "s/^ enabled: no$/ enabled: yes/" /etc/pkg/FreeBSD.conf
echo "Removing OPNsense version"
rm -f /usr/local/opnsense/version/opnsense