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