summaryrefslogtreecommitdiffstats
path: root/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity
diff options
context:
space:
mode:
Diffstat (limited to 'ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity')
-rwxr-xr-xubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity41
1 files changed, 41 insertions, 0 deletions
diff --git a/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity b/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity
new file mode 100755
index 000000000..a018471b7
--- /dev/null
+++ b/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+PREREQ=""
+DESCRIPTION="Setting up automatic login (Trinity)..."
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+. /scripts/casper-functions
+
+log_begin_msg "$DESCRIPTION"
+
+if [ -f /root/etc/trinity/kdm/kdmrc ]; then
+ # Configure KDM-Trinity autologin
+ sed -i -r \
+ -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
+ -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \
+ -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \
+ /root/etc/trinity/kdm/kdmrc
+fi
+
+if [ -f /root/etc/trinity/tdm/tdmrc ]; then
+ # Configure TDM-Trinity autologin
+ sed -i -r \
+ -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
+ -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \
+ -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \
+ /root/etc/trinity/tdm/tdmrc
+fi
+
+log_end_msg