fix handling of /etc/init.d/xstartup for grml-small
authorMichael Prokop <mika@grml.org>
Wed, 17 Jan 2007 16:43:01 +0000 (17:43 +0100)
committerMichael Prokop <mika@grml.org>
Wed, 17 Jan 2007 16:43:01 +0000 (17:43 +0100)
autoconfig.functions
debian/changelog

index d2a0656..0b562b0 100755 (executable)
@@ -1607,9 +1607,20 @@ if checkbootparam startx ; then
 sudo -u $fstabuser -i /usr/bin/grml-x $WINDOWMANAGER 1>>$DEBUG
 EOF
    chmod 755 /etc/init.d/xstartup
 sudo -u $fstabuser -i /usr/bin/grml-x $WINDOWMANAGER 1>>$DEBUG
 EOF
    chmod 755 /etc/init.d/xstartup
-   sed -i 's/^allowed_users=.*/allowed_users=anybody/' /etc/X11/Xwrapper.config
-   sed -i 's#^6.*#6:2345:respawn:/bin/zsh --login -c "/etc/init.d/xstartup ; /bin/zsh"#'   /etc/inittab
+
+   if grep -q xstartup /etc/inittab ; then
+        sed -i 's#^6.*#6:2345:respawn:/bin/zsh --login -c "/etc/init.d/xstartup ; /bin/zsh"#'   /etc/inittab
+   else
+        echo '6:2345:respawn:/bin/zsh --login -c "/etc/init.d/xstartup ; /bin/zsh"' >> /etc/inittab
+   fi
    /sbin/telinit q ; eend $?
    /sbin/telinit q ; eend $?
+
+   if grep -q '^allowed_users=' /etc/X11/Xwrapper.config ; then
+      sed -i 's/^allowed_users=.*/allowed_users=anybody/' /etc/X11/Xwrapper.config
+   else
+      echo 'allowed_users=anybody' >> /etc/X11/Xwrapper.config
+   fi
+
   else
     eerror "We are not running from CD - startx will not work, skipping it.
      Please use something like xdm, gdm or kdm for starting X on a harddisk system!" ; eend 1
   else
     eerror "We are not running from CD - startx will not work, skipping it.
      Please use something like xdm, gdm or kdm for starting X on a harddisk system!" ; eend 1
index 3f17bcc..ade6a18 100644 (file)
@@ -1,3 +1,11 @@
+grml-autoconfig (0.6.11) unstable; urgency=low
+
+  * config_x_startup(): make sure handling of /etc/inittab for
+    bootoption startx works on grml-small too, thanks for
+    debugging and patch, Steffen Joeri!
+
+ -- Michael Prokop <mika@grml.org>  Wed, 17 Jan 2007 17:31:57 +0100
+
 grml-autoconfig (0.6.10) unstable; urgency=low
 
   * Use Uni3-Terminus16 instead of Uni3-Terminus14 as default font.
 grml-autoconfig (0.6.10) unstable; urgency=low
 
   * Use Uni3-Terminus16 instead of Uni3-Terminus14 as default font.