summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-01-15 20:07:03 +0100
committerSlávek Banko <slavek.banko@axis.cz>2014-01-15 20:07:15 +0100
commite6d7e8e6936e70e1d6a7d1f5df5171280befbfd1 (patch)
treee4df23e3e314e60f112b3e6360f4a89c37ea8e23 /ubuntu/maverick/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks
parent68a2f23896b2dfd53c80fff69f3663b76b1b73e0 (diff)
downloadtde-packaging-e6d7e8e6936e70e1d6a7d1f5df5171280befbfd1.tar.gz
tde-packaging-e6d7e8e6936e70e1d6a7d1f5df5171280befbfd1.zip
Update remaining metapackages on Debian and Ubuntu
to conform the current automated scripts on build-farm
Diffstat (limited to 'ubuntu/maverick/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks')
-rwxr-xr-xubuntu/maverick/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks/55_trinity52
1 files changed, 52 insertions, 0 deletions
diff --git a/ubuntu/maverick/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks/55_trinity b/ubuntu/maverick/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks/55_trinity
new file mode 100755
index 000000000..e31165c02
--- /dev/null
+++ b/ubuntu/maverick/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks/55_trinity
@@ -0,0 +1,52 @@
+#! /bin/sh
+set -e
+
+#-- configure autologin
+. /usr/share/debconf/confmodule
+
+export LANG=C # avoid locale errors from perl
+ROOT=/target
+chroot=chroot
+log='log-output -t trinity-livecd'
+
+db_get passwd/username
+USER="$RET"
+db_get passwd/auto-login
+if [ -n "$USER" ] && [ "$RET" = true ]; then
+ if $chroot $ROOT [ -f /etc/trinity/kdm/kdmrc ]; then
+ # Configure KDM autologin
+ $log $chroot $ROOT sed -i$BACKUP -r \
+ -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
+ -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USER/" \
+ -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \
+ /etc/trinity/kdm/kdmrc
+ fi
+
+ if $chroot $ROOT [ -f /etc/trinity/tdm/tdmrc ]; then
+ # Configure TDM autologin
+ $log $chroot $ROOT sed -i$BACKUP -r \
+ -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
+ -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USER/" \
+ -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \
+ /etc/trinity/tdm/tdmrc
+ fi
+fi
+
+#-- cleanup additional packages
+packages=""
+if [ -f "$ROOT/var/lib/dpkg/info/casper-trinity.list" ]; then
+ packages="$packages casper-trinity"
+fi
+if [ -f "$ROOT/var/lib/dpkg/info/ubiquity-trinity.list" ]; then
+ packages="$packages ubiquity-trinity"
+fi
+if [ -n "$packages" ]; then
+ if [ -f "$ROOT/usr/bin/apt-get" ]; then
+ $chroot $ROOT apt-get -y purge $packages
+ $chroot $ROOT apt-get -y --purge autoremove
+ else
+ $chroot $ROOT dpkg -P $packages
+ fi
+fi
+
+exit 0