install.sh: Don't fail if $SYSCONFDIR doesn't exist.
authorPascal Volk <user@localhost.localdomain.org>
Sun, 28 Oct 2012 12:59:30 +0000
changeset 631 9b4d0e2c97d5
parent 630 c4c687668b6d
child 632 152ea3e3e955
install.sh: Don't fail if $SYSCONFDIR doesn't exist.
install.sh
--- a/install.sh	Wed Oct 24 19:04:32 2012 +0000
+++ b/install.sh	Sun Oct 28 12:59:30 2012 +0000
@@ -13,8 +13,10 @@
 DOC_DIR=${PREFIX}/share/doc/vmm
 if [ ${PREFIX} = "/usr" ]; then
     MANDIR=${PREFIX}/share/man
+    SYSCONFDIR=/etc
 else
     MANDIR=${PREFIX}/man
+    SYSCONFDIR=${PREFIX}/etc
 fi
 DOCS="ChangeLog Configure.Dovecot_2 COPYING INSTALL NEWS README"
 
@@ -29,7 +31,8 @@
 python setup.py -q install --force --prefix ${PREFIX}
 python setup.py clean --all >/dev/null
 
-install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${PREFIX}/etc/
+[ -d ${SYSCONFDIR} ] || mkdir -m 0755 -p ${SYSCONFDIR}
+install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${SYSCONFDIR}/
 install ${INSTALL_OPTS_CF} postfix/pgsql-*.cf ${PF_CONFDIR}/
 install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin