[Piuparts-commits] [piuparts] 07/10: exception for freedombox-setup

Holger Levsen holger at layer-acht.org
Sun May 1 11:55:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 09891001db79d179c428b68953267b5947f57d03
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun May 1 10:19:49 2016 +0200

    exception for freedombox-setup
    
    replaces /etc/motd with a symlink
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 custom-scripts/scripts/pre_install_exceptions |  7 +++++++
 custom-scripts/scripts/pre_remove_exceptions  | 12 ++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/custom-scripts/scripts/pre_install_exceptions b/custom-scripts/scripts/pre_install_exceptions
index e3878ab..3bbe2d4 100755
--- a/custom-scripts/scripts/pre_install_exceptions
+++ b/custom-scripts/scripts/pre_install_exceptions
@@ -91,6 +91,13 @@ case ${PIUPARTS_OBJECTS%%=*} in
 			log_debug
 			dpkg-divert --rename /usr/sbin/lpadmin
 			;;
+	freedombox-setup)
+			log_debug
+			# replaces /etc/motd by a symlink
+			if [ -e /etc/motd ] && [ ! -L /etc/motd ] && [ ! -e /etc/motd.orig ]; then
+				mv -v /etc/motd /etc/motd.orig
+			fi
+			;;
 	bugzilla3)
 			# checksetup.pl goes into infinite loop asking for them
 			log_debug
diff --git a/custom-scripts/scripts/pre_remove_exceptions b/custom-scripts/scripts/pre_remove_exceptions
index 48893c6..7f5d5d5 100755
--- a/custom-scripts/scripts/pre_remove_exceptions
+++ b/custom-scripts/scripts/pre_remove_exceptions
@@ -35,6 +35,18 @@ case ${PIUPARTS_OBJECTS%%=*} in
 		log_debug
 		dpkg-divert --remove --rename /usr/sbin/lpadmin
 		;;
+	freedombox-setup)
+		log_debug
+		# cleanup from pre_install_exceptions
+		if [ -e /etc/motd.orig ]; then
+			if [ -L /etc/motd ]; then
+				rm -v /etc/motd
+			fi
+			if [ ! -e /etc/motd ]; then
+				mv -v /etc/motd.orig /etc/motd
+			fi
+		fi
+		;;
 esac
 
 # Allow removal of the kernel running on the host from the chroot.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list