Fix bootoption ssh
authorMichael Prokop <mika@grml.org>
Wed, 20 May 2009 16:04:10 +0000 (18:04 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 20 May 2009 16:04:10 +0000 (18:04 +0200)
autoconfig.functions
debian/changelog

index af4ce8a..787252a 100755 (executable)
@@ -1464,7 +1464,12 @@ if checkbootparam ssh ; then
 
    # finally check if we have a password we can use:
    if [ -n "$SSH_PASSWD" ] ; then
-      echo "grml:$SSH_PASSWD" | chpasswd -m
+      # chpasswd sucks, seriously.
+      if chpasswd --help 2>&1 | grep -q -- '-m,' ; then
+        echo "grml:$SSH_PASSWD" | chpasswd -m
+      else
+        echo "grml:$SSH_PASSWD" | chpasswd
+      fi
    fi
 
    einfo 'Starting secure shell server in background.'
index 70ad9db..a24de2a 100644 (file)
@@ -1,3 +1,10 @@
+grml-autoconfig (0.8.22) unstable; urgency=low
+
+  * Fix bootoption "ssh": current versions of chpasswd don't support
+    option '-m' anymore (foo, this sucks!). [Testing: issue671]
+
+ -- Michael Prokop <mika@grml.org>  Wed, 20 May 2009 18:02:23 +0200
+
 grml-autoconfig (0.8.21) unstable; urgency=low
 
   * Install haltlocal initscript in postinst script.