]> code.citadel.org Git - citadel.git/blobdiff - citadel/newinstall.sh
* Default for autologin is now DISABLED! If you are upgrading an existing
[citadel.git] / citadel / newinstall.sh
index a1c34f813fd3a438aa5d647876d03e63cbb0e843..4548a7fcc2b2c5ae0625b1625d3fda9e4c443bd0 100644 (file)
@@ -92,6 +92,7 @@ MAKEOPTS=""
 # CFLAGS               C compiler flags
 # LDFLAGS              Linker flags
 # IS_UPGRADE           Set to "yes" if upgrading an existing Citadel
+# IS_AUTOLOGIN         Set to "yes" to force enabling autologin
 # CTDL_DIALOG          Where (if at all) the "dialog" program may be found
 
 # Let Citadel setup recognize the Citadel installer
@@ -264,11 +265,16 @@ install_sources () {
                cd $BUILD 2>&1 >>$LOG || die
                ( gzip -dc $CITADEL_SOURCE | tar -xvf - ) 2>&1 >>$LOG || die
                cd $BUILD/citadel 2>&1 >>$LOG || die
+               if [ x$IS_AUTOLOGIN = xyes ] ; then
+                       AL="--enable-autologin"
+               else
+                       AL=""
+               fi
                if [ -z "$OK_DB" ]
                then
-                       ./configure --prefix=$CITADEL --with-db=$SUPPORT --with-pam --enable-autologin --with-libical --disable-threaded-client 2>&1 >>$LOG || die
+                       ./configure --prefix=$CITADEL --with-db=$SUPPORT --with-pam $AL --with-libical --disable-threaded-client 2>&1 >>$LOG || die
                else
-                       ./configure --prefix=$CITADEL --with-db=$OK_DB --with-pam --enable-autologin --with-libical --disable-threaded-client 2>&1 >>$LOG || die
+                       ./configure --prefix=$CITADEL --with-db=$OK_DB --with-pam $AL --with-libical --disable-threaded-client 2>&1 >>$LOG || die
                fi
                $MAKE $MAKEOPTS 2>&1 >>$LOG || die
                if [ $IS_UPGRADE = yes ]
@@ -317,7 +323,6 @@ do_config () {
 
        if [ x$IS_UPGRADE == xyes ] ; then
                echo Upgrading your existing Citadel installation.
-               #$CITADEL/setup -q || die
                $CITADEL/setup </dev/tty || die
        else
                echo This is a new Citadel installation.
@@ -386,6 +391,12 @@ mkdir -p $BUILD
 cd $BUILD
 
 
+# 1B. Determine whether we are upgrading an autologin installation
+[ -x $CITADEL/chkpwd ] && {
+       IS_AUTOLOGIN="yes"
+}
+
+
 # 2. Present the installation steps (from 1 above) to the user
 clear
 if dialog --clear </dev/tty ; then
@@ -404,6 +415,10 @@ echo ""
 echo "Configuration:"
 echo "* Configure Citadel"
 echo "* Configure WebCit"
+if [ x$IS_AUTOLOGIN = xyes ] ; then
+       echo 'NOTE: this is an autologin installation.'
+       echo '      Authentication against user accounts on the host system is enabled.'
+fi
 echo ""
 echo -n "Perform the above installation steps now? "
 read yesno </dev/tty