Create /var/lib/misc/thishost as a symlink to the hostname in postinst
authorPeter Palfrader <peter@palfrader.org>
Wed, 16 Apr 2008 12:08:46 +0000 (14:08 +0200)
committerPeter Palfrader <peter@palfrader.org>
Wed, 16 Apr 2008 12:08:46 +0000 (14:08 +0200)
debian/changelog
debian/postinst
debian/postrm [new file with mode: 0644]

index c6fc647..cab31a4 100644 (file)
@@ -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 <sgran@debian.org>  Mon, 07 Jan 2008 01:50:15 +0000
+ -- Peter Palfrader <weasel@debian.org>  Wed, 16 Apr 2008 14:05:44 +0200
 
 userdir-ldap (0.3.15) unstable; urgency=low
 
index e748473..b632e50 100644 (file)
@@ -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 (file)
index 0000000..ddfd7c4
--- /dev/null
@@ -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