[pkg-fso-commits] [SCM] Automatic Display Manager branch, pamhelper, updated. debian/0.1-20-g0d3be51

Enrico Zini enrico at enricozini.org
Tue Feb 17 12:01:22 UTC 2009


The following commit has been merged in the pamhelper branch:
commit 0d3be51bbf155763eb5412062a62630af2d09cfa
Author: Enrico Zini <enrico at enricozini.org>
Date:   Tue Feb 17 12:02:19 2009 +0000

    Don't ship the /etc/default file, but generate it
    
    This prevents overriding preseeds with default values in /e/d/nodm.
    
    However, preseeding still does not work and I don't know why

diff --git a/debian/default/nodm b/debian/default/nodm
deleted file mode 100644
index b904e54..0000000
--- a/debian/default/nodm
+++ /dev/null
@@ -1,20 +0,0 @@
-# nodm configuration
-
-# Set NODM_ENABLED to something different than 'false' to enable nodm
-NODM_ENABLED=false
-
-# User to autologin for
-NODM_USER=root
-
-# xinit program
-NODM_XINIT=/usr/bin/xinit
-
-# X session
-NODM_XSESSION=/etc/X11/Xsession
-
-# Options for the X server
-NODM_X_OPTIONS="vt7 -nolisten tcp"
-
-# If an X session will run for less than this time in seconds, nodm will wait an
-# increasing bit of time before restarting the session.
-NODM_MIN_SESSION_TIME=60
diff --git a/debian/nodm.install b/debian/nodm.install
index aaa1b84..2cdcc73 100644
--- a/debian/nodm.install
+++ b/debian/nodm.install
@@ -1,2 +1 @@
 nodm		/usr/sbin/
-debian/default/nodm /etc/default/
diff --git a/debian/nodm.postinst b/debian/nodm.postinst
index f564ee7..88e4c30 100644
--- a/debian/nodm.postinst
+++ b/debian/nodm.postinst
@@ -20,13 +20,38 @@ if [ "$1" = "configure" ] ; then
     db_get nodm/xsession
     NODM_XSESSION="$RET"
 
-    sed -i -r -e "s,^NODM_ENABLED=.+,NODM_ENABLED=$NODM_ENABLED," \
-              -e "s,^NODM_USER=.+,NODM_USER=$NODM_USER," \
-	      -e "s,^NODM_X_OPTIONS=.+,NODM_X_OPTIONS='$NODM_X_OPTIONS'," \
-	      -e "s,^NODM_MIN_SESSION_TIME=.+,NODM_MIN_SESSION_TIME=$NODM_MIN_SESSION_TIME," \
-	      -e "s,^NODM_XINIT=.+,NODM_XINIT=$NODM_XINIT," \
-	      -e "s,^NODM_XSESSION=.+,NODM_XSESSION=$NODM_XSESSION," \
-	      /etc/default/nodm
+    if [ -s /etc/default/nodm ] ; then
+	    sed -i -r -e "s,^NODM_ENABLED=.*,NODM_ENABLED=$NODM_ENABLED," \
+		      -e "s,^NODM_USER=.*,NODM_USER=$NODM_USER," \
+		      -e "s,^NODM_X_OPTIONS=.*,NODM_X_OPTIONS='$NODM_X_OPTIONS'," \
+		      -e "s,^NODM_MIN_SESSION_TIME=.*,NODM_MIN_SESSION_TIME=$NODM_MIN_SESSION_TIME," \
+		      -e "s,^NODM_XINIT=.*,NODM_XINIT=$NODM_XINIT," \
+		      -e "s,^NODM_XSESSION=.*,NODM_XSESSION=$NODM_XSESSION," \
+		      /etc/default/nodm
+    else
+	    cat <<EOF > /etc/default/nodm
+# nodm configuration
+
+# Set NODM_ENABLED to something different than 'false' to enable nodm
+NODM_ENABLED=$NODM_ENABLED
+
+# User to autologin for
+NODM_USER=$NODM_USER
+
+# xinit program
+NODM_XINIT=$NODM_XINIT
+
+# X session
+NODM_XSESSION=$NODM_XSESSION
+
+# Options for the X server
+NODM_X_OPTIONS='$NODM_X_OPTIONS'
+
+# If an X session will run for less than this time in seconds, nodm will wait an
+# increasing bit of time before restarting the session.
+NODM_MIN_SESSION_TIME=$NODM_MIN_SESSION_TIME
+EOF
+    fi
 fi
 	
 #DEBHELPER#

-- 
Automatic Display Manager



More information about the pkg-fso-commits mailing list