]> the.earth.li Git - onak.git/commitdiff
Create an initial database when installing the package.
authorJonathan McDowell <noodles@earth.li>
Tue, 14 Sep 2004 18:21:03 +0000 (18:21 +0000)
committerJonathan McDowell <noodles@earth.li>
Tue, 14 Sep 2004 18:21:03 +0000 (18:21 +0000)
If we're installing the Debian package and there's no existing database
then create one by importing my key.

debian/docs
debian/postinst

index 381cef36fd796da73e7d5fb4b00d3f841d933ccf..cf89c3b59ee10d235b87cea7b0b7e8f0c405549e 100644 (file)
@@ -3,3 +3,4 @@ README
 TODO
 PERFORMANCE
 HISTORY
+keys/noodles.key
index 1252508da87606529c3608814fd66c2f280d6494..f821f40ed00cc879ddc3bb9f31ef415b0868632d 100644 (file)
@@ -7,6 +7,13 @@ if [ "$1" = "configure" ]; then
     # Add the onak user
     adduser --system --home /var/lib/onak --no-create-home --disabled-login onak
 
+    # 
+    # If there's no onak database, create it by adding my key.
+    #
+    if [ ! -e /var/lib/onak/num_keydb ]; then
+        zcat /usr/share/doc/onak/noodles.key | onak -b add
+    fi
+
     # Take ownership of the database directory
     chown -R onak /var/lib/onak