Permalink
Browse files

Added ability to perform MDM autologin

  • Loading branch information...
1 parent 73b0fd7 commit 3b1c444710c47fc82c12674e6f528c9760fbe2b0 @clefebvre clefebvre committed May 9, 2012
View
24 d-i/source/user-setup/user-setup-apply
@@ -283,6 +283,30 @@ TimedLoginDelay=10"
sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile
fi
fi
+
+ if [ -d "$ROOT/etc/mdm" ]; then
+ # Configure MDM autologin
+ MDMCustomFile=$ROOT/etc/mdm/mdm.conf
+ if [ -e "$MDMCustomFile" ] && [ "$BACKUP" ]; then
+ cp "$MDMCustomFile" "${MDMCustomFile}$BACKUP"
+ fi
+ AutologinParameters="AutomaticLoginEnable=true\n\
+AutomaticLogin=$USER\n\
+TimedLoginEnable=true\n\
+TimedLogin=$USER\n\
+TimedLoginDelay=10"
+
+ # Prevent from updating if parameters already present (persistent usb key)
+ if ! `grep -qs "AutomaticLogin=$USER" $MDMCustomFile` ; then
+ if [ -e "$MDMCustomFile" ]; then
+ sed -i '/\(Automatic\|Timed\)Login/d' $MDMCustomFile
+ fi
+ if ! `grep -qs '\[daemon\]' $MDMCustomFile` ; then
+ echo '[daemon]' >> $MDMCustomFile
+ fi
+ sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $MDMCustomFile
+ fi
+ fi
if $chroot $ROOT [ -f /etc/kde4/kdm/kdmrc ]; then
# Configure KDM autologin
View
6 debian/changelog
@@ -1,3 +1,9 @@
+ubiquity (2.10.16-1linuxmint4) maya; urgency=low
+
+ * Added ability to perform MDM autologin
+
+ -- Clement Lefebvre <root@linuxmint.com> Thu, 10 May 2012 00:07:26 +0100
+
ubiquity (2.10.16-1linuxmint3) maya; urgency=low
* Fixed awkward translation in French
View
2 debian/oem-config.oem-config.upstart
@@ -11,6 +11,7 @@ start on (starting gdm
or starting xdm
or starting lxdm
or starting lightdm
+ or starting mdm
or starting uxlaunch
or starting oem-config-debconf)
stop on (runlevel [06]
@@ -19,6 +20,7 @@ stop on (runlevel [06]
or stopping xdm
or stopping lxdm
or stopping lightdm
+ or stopping mdm
or stopping uxlaunch)
emits starting-dm
View
2 debian/ubiquity.ubiquity.upstart
@@ -12,13 +12,15 @@ start on (starting gdm
or starting xdm
or starting lxdm
or starting lightdm
+ or starting mdm
or starting uxlaunch)
stop on (runlevel [06]
or stopping gdm
or stopping kdm
or stopping xdm
or stopping lxdm
or stopping lightdm
+ or stopping mdm
or stopping uxlaunch)
task

0 comments on commit 3b1c444

Please sign in to comment.