X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F15autologin;h=a4df2dfedc580b658a125c5ebb65f88b3388bf64;hb=c786c99d374d4da66e8211175187f2d477336556;hp=0b80f84744140e03d2b96b7ef5e7595b9279a745;hpb=321281c87aac51aa8df6617ee020956e4e0be561;p=live-boot-grml.git diff --git a/scripts/live-bottom/15autologin b/scripts/live-bottom/15autologin index 0b80f84..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 - printf "[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/ ]