X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F15autologin;h=a4df2dfedc580b658a125c5ebb65f88b3388bf64;hb=c786c99d374d4da66e8211175187f2d477336556;hp=bee8d7021fbbcb18abff0897b3790be875bfc1d6;hpb=fe6d99e926e668c1b43d38916e31f70947491124;p=live-boot-grml.git diff --git a/scripts/live-bottom/15autologin b/scripts/live-bottom/15autologin index bee8d70..a4df2df 100755 --- a/scripts/live-bottom/15autologin +++ b/scripts/live-bottom/15autologin @@ -66,15 +66,12 @@ TimedLoginDelay=10" # Prevent from updating if parameters already present (persistent usb # key) - if ! $(grep -qs 'AutomaticLoginEnable' $GDMCustomFile) + if ! $(grep -qs '\[daemon\]' $GDMCustomFile) then - if $(grep -qs '\[daemon\]' $GDMCustomFile) - then - sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile - else - echo "[daemon]\n$AutologinParameters" >> $GDMCustomFile - fi + echo '[daemon]' >> $GDMCustomFile fi + + sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile fi if [ -d /root/etc/default/kdm.d/ ]