X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=787252a6c6667fa577a7f6422c92e9022773f006;hp=af4ce8aa8d2d15bdaaa0f0e67031a9f5f9158cdb;hb=17a8f3d7f320670980c43388a73097922285f6a4;hpb=e0dfdf355005ab9d4ee337eed687d6519c74b1ac diff --git a/autoconfig.functions b/autoconfig.functions index af4ce8a..787252a 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -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.'