diff options
author | Renato Botelho <renato@netgate.com> | 2015-08-25 08:21:15 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-08-25 14:49:54 -0300 |
commit | 6f73c36226d8583b90ddcff50850701c06de2ee2 (patch) | |
tree | f040c4a5dfd77e9d14a8197f0c1e080c157fa2a5 /tools/templates/core_pkg/kernel/metadir/+DEINSTALL | |
parent | 46bc6e545a17e77202aaf01ec0cd8d5a46567525 (diff) | |
download | pfsense-6f73c36226d8583b90ddcff50850701c06de2ee2.zip pfsense-6f73c36226d8583b90ddcff50850701c06de2ee2.tar.gz |
Import build scripts from pfSense-tools repo
Diffstat (limited to 'tools/templates/core_pkg/kernel/metadir/+DEINSTALL')
-rw-r--r-- | tools/templates/core_pkg/kernel/metadir/+DEINSTALL | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/templates/core_pkg/kernel/metadir/+DEINSTALL b/tools/templates/core_pkg/kernel/metadir/+DEINSTALL new file mode 100644 index 0000000..2ecfa6e --- /dev/null +++ b/tools/templates/core_pkg/kernel/metadir/+DEINSTALL @@ -0,0 +1,19 @@ +#!/bin/sh + +if [ "${2}" != "DEINSTALL" ]; then + exit 0 +fi + +echo "===> Keeping a copy of current kernel in /boot/kernel.old" + +# Check if there is a current kernel to be moved +if [ ! -f /boot/kernel/kernel.gz ]; then + echo "ERROR: Current kernel not found" + exit 1 +fi + +[ -d /boot/kernel.old ] \ + rm -rf /boot/kernel.old + +cp -r /boot/kernel /boot/kernel.old +exit $? |