Merge lp:~tom-gall/linaro/live-helper-plasma-add-default-settings into lp:~linaro-maintainers/linaro/live-helper.config.maverick.handset-plasma

Proposed by Tom Gall
Status: Merged
Merged at revision: 46
Proposed branch: lp:~tom-gall/linaro/live-helper-plasma-add-default-settings
Merge into: lp:~linaro-maintainers/linaro/live-helper.config.maverick.handset-plasma
Diff against target: 104 lines (+80/-0)
5 files modified
chroot_local-hooks/01-setup_user_linaro.sh (+6/-0)
chroot_local-hooks/02-add_linaro_to-admin.sh (+5/-0)
chroot_local-hooks/03-check_sudoers_for_admin.sh (+10/-0)
chroot_local-hooks/04-set_QT_GRAPHICSYSTEM.sh (+46/-0)
chroot_local-hooks/05-update_kdmrc.sh (+13/-0)
To merge this branch: bzr merge lp:~tom-gall/linaro/live-helper-plasma-add-default-settings
Reviewer Review Type Date Requested Status
Jamie Bennett (community) Approve
Review via email: mp+38034@code.launchpad.net

Description of the change

- script to add default user linaro with pw linaro
- script to utilize the raster rendering mode
- script to modify kdmrc to autologin user linaro
- script to check for admin group existence and add linaro to admin group
- script to check for admin is in sudoers and if not add it

To post a comment you must log in.
Revision history for this message
Jamie Bennett (jamiebennett) wrote :

Looks good, merging.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'chroot_local-hooks/01-setup_user_linaro.sh'
2--- chroot_local-hooks/01-setup_user_linaro.sh 1970-01-01 00:00:00 +0000
3+++ chroot_local-hooks/01-setup_user_linaro.sh 2010-10-08 23:41:40 +0000
4@@ -0,0 +1,6 @@
5+#!/bin/sh
6+
7+echo "I: create linaro user"
8+adduser --gecos linaro --disabled-password linaro
9+echo "I: set linaro user password"
10+echo "linaro:linaro" | chpasswd
11
12=== added file 'chroot_local-hooks/02-add_linaro_to-admin.sh'
13--- chroot_local-hooks/02-add_linaro_to-admin.sh 1970-01-01 00:00:00 +0000
14+++ chroot_local-hooks/02-add_linaro_to-admin.sh 2010-10-08 23:41:40 +0000
15@@ -0,0 +1,5 @@
16+#!/bin/sh
17+
18+echo "I: add linaro to admin group"
19+usermod -G admin linaro
20+
21
22=== added file 'chroot_local-hooks/03-check_sudoers_for_admin.sh'
23--- chroot_local-hooks/03-check_sudoers_for_admin.sh 1970-01-01 00:00:00 +0000
24+++ chroot_local-hooks/03-check_sudoers_for_admin.sh 2010-10-08 23:41:40 +0000
25@@ -0,0 +1,10 @@
26+#!/bin/sh
27+
28+# check to make sure sudoers file has ref for admin
29+ADMINEXISTS="$(awk '$1 == "%admin" { print $1 }' /etc/sudoers)"
30+if [ "%admin" != "$ADMINEXISTS" ]; then
31+ # append admin entry to sudoers
32+ echo "# Members of the admin group may gain root privileges" >> /etc/sudoers
33+ echo "%admin ALL=(ALL) ALL" >> /etc/sudoers
34+fi
35+
36
37=== added file 'chroot_local-hooks/04-set_QT_GRAPHICSYSTEM.sh'
38--- chroot_local-hooks/04-set_QT_GRAPHICSYSTEM.sh 1970-01-01 00:00:00 +0000
39+++ chroot_local-hooks/04-set_QT_GRAPHICSYSTEM.sh 2010-10-08 23:41:40 +0000
40@@ -0,0 +1,46 @@
41+#!/bin/sh
42+
43+echo "I: set QT_GRAPHICSYSTEM in ~linaro/.profile"
44+
45+if [ -e ~linaro/.profile ]; then
46+
47+cat >> /home/linaro/.profile << EOF
48+
49+QT_GRAPHICSYSTEM=raster
50+
51+export QT_GRAPHICSYSTEM
52+EOF
53+
54+else
55+
56+cat > /home/linaro/.profile <<EOF
57+# ~/.profile: executed by the command interpreter for login shells.
58+# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
59+# exists.
60+# see /usr/share/doc/bash/examples/startup-files for examples.
61+# the files are located in the bash-doc package.
62+
63+# the default umask is set in /etc/profile; for setting the umask
64+# for ssh logins, install and configure the libpam-umask package.
65+#umask 022
66+
67+# if running bash
68+if [ -n "$BASH_VERSION" ]; then
69+ # include .bashrc if it exists
70+ if [ -f "$HOME/.bashrc" ]; then
71+ . "$HOME/.bashrc"
72+ fi
73+fi
74+
75+# set PATH so it includes user's private bin if it exists
76+if [ -d "$HOME/bin" ] ; then
77+ PATH="$HOME/bin:$PATH"
78+fi
79+
80+QT_GRAPHICSYSTEM=raster
81+
82+export QT_GRAPHICSYSTEM
83+
84+EOF
85+
86+fi
87
88=== added file 'chroot_local-hooks/05-update_kdmrc.sh'
89--- chroot_local-hooks/05-update_kdmrc.sh 1970-01-01 00:00:00 +0000
90+++ chroot_local-hooks/05-update_kdmrc.sh 2010-10-08 23:41:40 +0000
91@@ -0,0 +1,13 @@
92+#!/bin/sh
93+
94+echo "I: modify /etc/kde4/kdm/kdmrc for autologin"
95+
96+if [ -e /etc/kde4/kdm/kdmrc ]; then
97+
98+sed -i 's/\(#AutoLoginEnable=\).*/AutoLoginEnable=true/g' /etc/kde4/kdm/kdmrc
99+sed -i 's/\(#AutoLoginUser=\).*/AutoLoginUser=linaro/g' /etc/kde4/kdm/kdmrc
100+sed -i 's/\(AutoLoginEnable=\).*/\1true/g' /etc/kde4/kdm/kdmrc
101+sed -i 's/\(AutocLoginUser=\).*/\1linaro/g' /etc/kde4/kdm/kdmrc
102+
103+fi
104+# if it's not installed clearly we have problems

Subscribers

People subscribed via source and target branches

to all changes: