source: trunk/debathena/config/reactivate/debian/Xsession.debathena @ 24125

Revision 24125, 1015 bytes checked in by geofft, 15 years ago (diff)
In reactivate: * Rewrite to use schroot 1.3 and aufs union mounts instead of LVM. This makes logins on a Dell 760 take about 8 seconds to reach the desktop. - TODO: Reincorporate clean-up fallbacks (e.g. rebooting) of previous version. - TODO: Deal with manually modified /etc/schroot/schroot.conf.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3set -e
4
5addgroups="admin lpadmin adm fuse cdrom floppy audio video plugdev scanner dialout"
6daemons="$(/usr/sbin/policy-rc.d --daemons)"
7
8# Setup
9
10session=$(schroot -c login -b)
11for group in $addgroups; do
12    schroot -c "$session" -r -u root -- gpasswd -a "$USER" "$group"
13done
14
15schroot -c "$session" -r -u root -- sed -i "/su-error/d" "/etc/pam.d/su.debathena"
16
17for daemon in $daemons; do
18    schroot -c "$session" -r -u root -- invoke-rc.d "$daemon" start || [ $? = 100 ]
19done
20
21schroot -c "$session" -r -u root -- touch /ClusterLogin
22
23schroot -c "$session" -r -u root -- rm /etc/debian_chroot
24
25# Run the session
26#
27# We wrap the Xsession in sudo because it runs initgroups(3)
28# /after/ being chrooted, which puts users back in the groups we
29# added them to
30schroot -c "$session" -r -p -- sudo -E -u "$USER" -- /etc/gdm/Xsession.debathena-orig "$@"
31
32# Teardown
33
34for daemon in $daemons; do
35    schroot -c "$session" -r -u root -- invoke-rc.d "$daemon" stop || [ $? = 100 ]
36done
37
38schroot -c "$session" -e
Note: See TracBrowser for help on using the repository browser.