Merging casper 1.123.
[live-boot-grml.git] / scripts / live-bottom / 44pk_allow
1 #!/bin/sh
2
3 PREREQ=""
4 DESCRIPTION="Grant administrative PolicyKit pivilieges to default user..."
5
6 . /scripts/casper-functions
7
8 prereqs()
9 {
10        echo "$PREREQ"
11 }
12
13 case $1 in
14 # get pre-requisites
15 prereqs)
16        prereqs
17        exit 0
18        ;;
19 esac
20
21 log_begin_msg "$DESCRIPTION"
22
23 # configure PolicyKit in live session
24 cat << EOF > /root/etc/PolicyKit/PolicyKit.conf
25
26 <?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
27
28 <!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
29 "http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">
30
31 <!-- See the manual page PolicyKit.conf(5) for file format -->
32
33 <config version="0.1">
34     <match user="root">
35         <return result="yes"/>
36     </match>
37     <!-- don't ask password for user in live session -->
38     <match user="$USERNAME">
39         <return result="yes"/>
40     </match>
41     <define_admin_auth group="admin"/>
42 </config>
43 EOF
44
45 log_end_msg