From 679611b3b662e086961e969ae43e4131e2e046a6 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 16 Apr 2008 14:08:46 +0200 Subject: [PATCH] Create /var/lib/misc/thishost as a symlink to the hostname in postinst --- debian/changelog | 3 ++- debian/postinst | 4 ++++ debian/postrm | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 debian/postrm diff --git a/debian/changelog b/debian/changelog index c6fc647..cab31a4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ userdir-ldap (0.3.15+xxx) XXunstable; urgency=low * ud-roleadd: Do not try to make role accounts of objectClass inetOrgPerson, that doesn't work. * Add myself to uploaders. + * Create /var/lib/misc/thishost as a symlink to the hostname in postinst. [ Mark Hymers ] * ud-userimport, ud-groupadd, ud-roleadd, ud-useradd, userdir_ldap.py: @@ -60,7 +61,7 @@ userdir-ldap (0.3.15+xxx) XXunstable; urgency=low * Build manpages at build time (add Build-Depend on yodl) * Install built manpages - -- Stephen Gran Mon, 07 Jan 2008 01:50:15 +0000 + -- Peter Palfrader Wed, 16 Apr 2008 14:05:44 +0200 userdir-ldap (0.3.15) unstable; urgency=low diff --git a/debian/postinst b/debian/postinst index e748473..b632e50 100644 --- a/debian/postinst +++ b/debian/postinst @@ -4,5 +4,9 @@ if [ "$1" = "configure" ] then test ! -f /usr/local/bin/ud-replicate || rm -f /usr/local/bin/ud-replicate + + if ! [ -e /var/lib/misc/thishost ]; then + ln -s "`hostname`" /var/lib/misc/thishost + fi fi exit 0 diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..ddfd7c4 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,10 @@ +#! /bin/bash -e +# +#DEBHELPER# +if [ "$1" = "purge" ] +then + if [ -L /var/lib/misc/thishost ]; then + rm /var/lib/misc/thishost + fi +fi +exit 0 -- 2.20.1