From e162aef75e37eee42eb8689b3b432210cedc7198 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 25 Jun 2014 12:32:09 -0400 Subject: Manage branding link in maintainer scripts. --- diff --git a/proteanos-branding.pkg/postinst b/proteanos-branding.pkg/postinst index ea2ecad..09610a7 100644 --- a/proteanos-branding.pkg/postinst +++ b/proteanos-branding.pkg/postinst @@ -6,6 +6,8 @@ if [ "x${1}" = 'xconfigure' ]; then cp /usr/share/branding/www/index.html /var/www/index.html sha256sum /var/www/index.html \ >/usr/share/branding/www/SHA256SUMS + [ -e /var/www/branding ] || \ + ln -s /usr/share/branding /var/www/branding elif [ -f /var/www/index.html ] && \ [ -f /usr/share/branding/www/SHA256SUMS ]; then if sha256sum -cs /usr/share/branding/www/SHA256SUMS; then @@ -15,6 +17,8 @@ if [ "x${1}" = 'xconfigure' ]; then /var/www/index.html sha256sum /var/www/index.html \ >/usr/share/branding/www/SHA256SUMS + [ -e /var/www/branding ] || \ + ln -s /usr/share/branding /var/www/branding fi fi fi diff --git a/proteanos-branding.pkg/prerm b/proteanos-branding.pkg/prerm index 11ba0a0..214c71d 100644 --- a/proteanos-branding.pkg/prerm +++ b/proteanos-branding.pkg/prerm @@ -10,5 +10,8 @@ if [ "x${1}" = 'xremove' ]; then rm /var/www/index.html fi rm /usr/share/branding/www/SHA256SUMS + if ls -l /var/www/branding | grep -Fq /usr/share/branding; then + rm /var/www/branding + fi fi fi -- cgit v0.9.1