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 | |
---|
3 | set -e |
---|
4 | |
---|
5 | addgroups="admin lpadmin adm fuse cdrom floppy audio video plugdev scanner dialout" |
---|
6 | daemons="$(/usr/sbin/policy-rc.d --daemons)" |
---|
7 | |
---|
8 | # Setup |
---|
9 | |
---|
10 | session=$(schroot -c login -b) |
---|
11 | for group in $addgroups; do |
---|
12 | schroot -c "$session" -r -u root -- gpasswd -a "$USER" "$group" |
---|
13 | done |
---|
14 | |
---|
15 | schroot -c "$session" -r -u root -- sed -i "/su-error/d" "/etc/pam.d/su.debathena" |
---|
16 | |
---|
17 | for daemon in $daemons; do |
---|
18 | schroot -c "$session" -r -u root -- invoke-rc.d "$daemon" start || [ $? = 100 ] |
---|
19 | done |
---|
20 | |
---|
21 | schroot -c "$session" -r -u root -- touch /ClusterLogin |
---|
22 | |
---|
23 | schroot -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 |
---|
30 | schroot -c "$session" -r -p -- sudo -E -u "$USER" -- /etc/gdm/Xsession.debathena-orig "$@" |
---|
31 | |
---|
32 | # Teardown |
---|
33 | |
---|
34 | for daemon in $daemons; do |
---|
35 | schroot -c "$session" -r -u root -- invoke-rc.d "$daemon" stop || [ $? = 100 ] |
---|
36 | done |
---|
37 | |
---|
38 | schroot -c "$session" -e |
---|
Note: See
TracBrowser
for help on using the repository browser.