From 253fb1f06aea5951ecb8106327060e6a78d518e7 Mon Sep 17 00:00:00 2001 From: lars Date: Wed, 30 Nov 2005 03:39:17 +0000 Subject: [PATCH] debian package setup is more compliant than before --- DEBIAN/postinst | 10 ++++++++++ DEBIAN/prerm | 7 +++++++ cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh | 2 -- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 DEBIAN/postinst create mode 100755 DEBIAN/prerm diff --git a/DEBIAN/postinst b/DEBIAN/postinst new file mode 100755 index 0000000..beee3db --- /dev/null +++ b/DEBIAN/postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +# add the cryptobox startup script to /etc/rc?.d +update-rc.d cryptobox 98 + +# start it +if invoke-rc.d cryptobox status + then invoke-rc.d cryptobox restart + else invoke-rc.d cryptobox start + fi diff --git a/DEBIAN/prerm b/DEBIAN/prerm new file mode 100755 index 0000000..14cb704 --- /dev/null +++ b/DEBIAN/prerm @@ -0,0 +1,7 @@ +#!/bin/sh + +# shut down +invoke-rc.d cryptobox stop + +# remove symlinks in /etc/rc?.d +[ "$1" = "purge" ] && update-rc.d cryptobox remove diff --git a/cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh b/cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh index 7522293..cd4cc5e 100755 --- a/cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh +++ b/cbox-tree.d/usr/lib/cryptobox/configure-cryptobox.sh @@ -38,8 +38,6 @@ function configure_normal() # the usual stuff - not optimized for security { ########### boot up ########### - # set default runlevel to 3 - sed -i 's/^id:2:initdefault/id:3:initdefault/' /etc/inittab # turn off creation of "/etc/nologin" (read-only fs) sed -i '/^DELAYLOGIN=/s/^DELAYLOGIN=.*$/DELAYLOGIN=no/' /etc/default/rcS # turn off modifying /etc/motd (read-only fs)