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
=== added file 'chroot_local-hooks/01-setup_user_linaro.sh'
--- chroot_local-hooks/01-setup_user_linaro.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/01-setup_user_linaro.sh 2010-10-08 23:41:40 +0000
@@ -0,0 +1,6 @@
1#!/bin/sh
2
3echo "I: create linaro user"
4adduser --gecos linaro --disabled-password linaro
5echo "I: set linaro user password"
6echo "linaro:linaro" | chpasswd
07
=== added file 'chroot_local-hooks/02-add_linaro_to-admin.sh'
--- chroot_local-hooks/02-add_linaro_to-admin.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/02-add_linaro_to-admin.sh 2010-10-08 23:41:40 +0000
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3echo "I: add linaro to admin group"
4usermod -G admin linaro
5
06
=== added file 'chroot_local-hooks/03-check_sudoers_for_admin.sh'
--- chroot_local-hooks/03-check_sudoers_for_admin.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/03-check_sudoers_for_admin.sh 2010-10-08 23:41:40 +0000
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3# check to make sure sudoers file has ref for admin
4ADMINEXISTS="$(awk '$1 == "%admin" { print $1 }' /etc/sudoers)"
5if [ "%admin" != "$ADMINEXISTS" ]; then
6 # append admin entry to sudoers
7 echo "# Members of the admin group may gain root privileges" >> /etc/sudoers
8 echo "%admin ALL=(ALL) ALL" >> /etc/sudoers
9fi
10
011
=== added file 'chroot_local-hooks/04-set_QT_GRAPHICSYSTEM.sh'
--- chroot_local-hooks/04-set_QT_GRAPHICSYSTEM.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/04-set_QT_GRAPHICSYSTEM.sh 2010-10-08 23:41:40 +0000
@@ -0,0 +1,46 @@
1#!/bin/sh
2
3echo "I: set QT_GRAPHICSYSTEM in ~linaro/.profile"
4
5if [ -e ~linaro/.profile ]; then
6
7cat >> /home/linaro/.profile << EOF
8
9QT_GRAPHICSYSTEM=raster
10
11export QT_GRAPHICSYSTEM
12EOF
13
14else
15
16cat > /home/linaro/.profile <<EOF
17# ~/.profile: executed by the command interpreter for login shells.
18# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
19# exists.
20# see /usr/share/doc/bash/examples/startup-files for examples.
21# the files are located in the bash-doc package.
22
23# the default umask is set in /etc/profile; for setting the umask
24# for ssh logins, install and configure the libpam-umask package.
25#umask 022
26
27# if running bash
28if [ -n "$BASH_VERSION" ]; then
29 # include .bashrc if it exists
30 if [ -f "$HOME/.bashrc" ]; then
31 . "$HOME/.bashrc"
32 fi
33fi
34
35# set PATH so it includes user's private bin if it exists
36if [ -d "$HOME/bin" ] ; then
37 PATH="$HOME/bin:$PATH"
38fi
39
40QT_GRAPHICSYSTEM=raster
41
42export QT_GRAPHICSYSTEM
43
44EOF
45
46fi
047
=== added file 'chroot_local-hooks/05-update_kdmrc.sh'
--- chroot_local-hooks/05-update_kdmrc.sh 1970-01-01 00:00:00 +0000
+++ chroot_local-hooks/05-update_kdmrc.sh 2010-10-08 23:41:40 +0000
@@ -0,0 +1,13 @@
1#!/bin/sh
2
3echo "I: modify /etc/kde4/kdm/kdmrc for autologin"
4
5if [ -e /etc/kde4/kdm/kdmrc ]; then
6
7sed -i 's/\(#AutoLoginEnable=\).*/AutoLoginEnable=true/g' /etc/kde4/kdm/kdmrc
8sed -i 's/\(#AutoLoginUser=\).*/AutoLoginUser=linaro/g' /etc/kde4/kdm/kdmrc
9sed -i 's/\(AutoLoginEnable=\).*/\1true/g' /etc/kde4/kdm/kdmrc
10sed -i 's/\(AutocLoginUser=\).*/\1linaro/g' /etc/kde4/kdm/kdmrc
11
12fi
13# if it's not installed clearly we have problems

Subscribers

People subscribed via source and target branches

to all changes: