fix the *inst scripts to properly handle linking in the gpg.conf files.
authorJameson Graef Rollins <jrollins@phys.columbia.edu>
Sat, 11 Oct 2008 19:56:18 +0000 (15:56 -0400)
committerJameson Graef Rollins <jrollins@phys.columbia.edu>
Sat, 11 Oct 2008 20:14:31 +0000 (16:14 -0400)
debian/monkeysphere.postinst
debian/monkeysphere.preinst
src/monkeysphere-server

index 0e361867e6a0555f6950b2f7748cc4bbdbbe0e56..27a50e00017f70bb94407f78f6b54b8ae4686d56 100755 (executable)
@@ -20,9 +20,9 @@ fi
 # install host gnupg home directory
 install --owner root --group monkeysphere --mode 750 -d "$VARLIB"/gnupg-host
 # link in the gpg.conf
-ln -sf "$ETC"/gnupg-host.conf "$VARLIB"/gnupg-host/gpg.conf
+ln -sTf "$ETC"/gpg-host.conf "$VARLIB"/gnupg-host/gpg.conf
 
 # install authentication gnupg home directory
 install --owner monkeysphere --group monkeysphere --mode 700 -d "$VARLIB"/gnupg-authentication
 # link in the gpg.conf
-ln -sf "$ETC"/gnupg-authentication.conf "$VARLIB"/gnupg-authentication/gpg.conf
+ln -sTf "$ETC"/gpg-authentication.conf "$VARLIB"/gnupg-authentication/gpg.conf
index bfa6a9168f1dd4068011ab62cdb4b5a40b13b78d..860286b069de5db0927b9bd527d80a1404bd2a9a 100755 (executable)
@@ -12,7 +12,11 @@ VARLIB="/var/lib/monkeysphere"
 # /etc, where they will be linked back into the GNUPGHOMEs later
 if [ -f "$VARLIB"/gnupg-host/gpg.conf -a ! -L "$VARLIB"/gnupg-host/gpg.conf ] ; then
     mv "$VARLIB"/gnupg-host/gpg.conf "$ETC"/gpg-host.conf
+    chown root:root "$ETC"/gpg-host.conf
+    ln -s "$ETC"/gpg-host.conf "$VARLIB"/gnupg-host/gpg.conf
 fi
 if [ -f "$VARLIB"/gnupg-authentication/gpg.conf -a ! -L "$VARLIB"/gnupg-authentication/gpg.conf ] ; then
-    mv "$VARLIB"/gnupg-authentication/gpg.conf "$ETC"/gnupg-authentication.conf 
+    mv "$VARLIB"/gnupg-authentication/gpg.conf "$ETC"/gpg-authentication.conf
+    chown root:root "$ETC"/gpg-authentication.conf
+    ln -s "$ETC"/gpg-authentication.conf "$VARLIB"/gnupg-authentication/gpg.conf
 fi
index 324a27351f24fb5916215d6c174ce0061ef04300..60a83af3adf339070a358c85cfe5ed85eee13cb5 100755 (executable)
@@ -17,7 +17,7 @@ SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"/usr/share/monkeysphere"}
 export SYSSHAREDIR
 . "${SYSSHAREDIR}/common" || exit 1
 
-SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"/var/lib/monkeysphere"
+SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"/var/lib/monkeysphere"}
 export SYSDATADIR
 
 # UTC date in ISO 8601 format if needed