+casper (1.214) lucid; urgency=low
+
+ * 15autologin: simplify the code with escape character evaluation
+ (LP: #505140)
+
+ -- Didier Roche <didrocks@ubuntu.com> Tue, 12 Jan 2010 08:57:05 +0100
+
casper (1.213) lucid; urgency=low
* printf does not evaluate escape characters in the argument string.
# 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/ ]