diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-11-06 07:34:57 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-11-06 07:57:21 -0200 |
commit | e7a0051400f40611718e2f1c5131d2a64cebefb4 (patch) | |
tree | 6a0d06a2f3794ce3dde0506f29b49454716d9c6c /tmp/post_upgrade_command | |
parent | 48f77cef068930e77b76e4f15e72e9cc230c9dc4 (diff) | |
download | pfsense-e7a0051400f40611718e2f1c5131d2a64cebefb4.zip pfsense-e7a0051400f40611718e2f1c5131d2a64cebefb4.tar.gz |
Process obsolete files in shell script instead of php
Diffstat (limited to 'tmp/post_upgrade_command')
-rwxr-xr-x | tmp/post_upgrade_command | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tmp/post_upgrade_command b/tmp/post_upgrade_command index 613584f..225bafd 100755 --- a/tmp/post_upgrade_command +++ b/tmp/post_upgrade_command @@ -38,3 +38,13 @@ fi; if [ "${PFSENSETYPE}" = "nanobsd" -a -f /etc/localtime ]; then /bin/cp -p /etc/localtime ${ROOT}etc/localtime 2>/dev/null fi + +# Obsolete files - nanobsd doesn't need it since a new image is installed +# on the other partition +if [ "${PFSENSETYPE}" != "nanobsd" -a -f /etc/pfSense.obsoletedfiles ]; then + for f in $(cat /etc/pfSense.obsoletedfiles); do + if [ -n "${f}" -a -f "${f}" ]; then + rm -f ${f} + fi + done +fi |