diff options
author | Renato Botelho <renato@netgate.com> | 2015-11-16 17:06:28 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-11-16 17:09:11 -0200 |
commit | 9bdf72fde199a822cb1bc6416f43647cd9365345 (patch) | |
tree | d3c66890091b3c2de88b6315afa1b102d8945808 /src/usr/local | |
parent | ca50d3eb621b741322f52d943b63a95229e3f794 (diff) | |
download | pfsense-9bdf72fde199a822cb1bc6416f43647cd9365345.zip pfsense-9bdf72fde199a822cb1bc6416f43647cd9365345.tar.gz |
Add a workaround on pfSense-upgrade to prevent breaking strongswan port due to the symlinks we create
Diffstat (limited to 'src/usr/local')
-rwxr-xr-x | src/usr/local/sbin/pfSense-upgrade | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade index 0d0388c..3d37e33 100755 --- a/src/usr/local/sbin/pfSense-upgrade +++ b/src/usr/local/sbin/pfSense-upgrade @@ -360,6 +360,24 @@ pkg_upgrade() { if [ "${next_stage}" = "2" ]; then pkg_lock "${pkg_prefix}*" + # XXX: Workaround to upgrade strongswan + # If those symlinks are present, pkg exit because it expects them + # to be a directory + if [ $(pkg ${pkg_chroot} upgrade -nq strongswan | wc -l) -gt 1 ]; then + if [ -L ${chroot_dir}/usr/local/etc/ipsec.d ]; then + rm -f ${chroot_dir}/usr/local/etc/ipsec.d + fi + if [ -L ${chroot_dir}/usr/local/etc/ipsec.conf ]; then + rm -f ${chroot_dir}/usr/local/etc/ipsec.conf + fi + if [ -L ${chroot_dir}/usr/local/etc/strongswan.d ]; then + rm -f ${chroot_dir}/usr/local/etc/strongswan.d + fi + if [ -L ${chroot_dir}/usr/local/etc/strongswan.conf ]; then + rm -f ${chroot_dir}/usr/local/etc/strongswan.conf + fi + fi + if [ $(pkg ${pkg_chroot} upgrade -nq | wc -l) -gt 1 ]; then _echo "Upgrading necessary packages..." if ! pkg ${pkg_chroot} upgrade 2>&1 | tee -a ${logfile}; then |