Adding upstream version 1.124.1.
[debian-live-boot/hramrach.git] / scripts / live-bottom / 44pk_allow
blob6ed8d960521fde92877e2f9ba966b11aacb0fe7d
1 #!/bin/sh
3 #set -e
5 # initramfs-tools header
7 PREREQ=""
9 prereqs()
11 echo "${PREREQ}"
14 case "${1}" in
15 prereqs)
16 prereqs
17 exit 0
19 esac
21 # live-initramfs header
23 . /scripts/live-functions
25 log_begin_msg "Grant administrative PolicyKit pivilieges to default user..."
27 # live-initramfs script
29 # configure PolicyKit in live session
30 cat << EOF > /root/etc/PolicyKit/PolicyKit.conf
31 <?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
33 <!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
34 "http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">
36 <!-- See the manual page PolicyKit.conf(5) for file format -->
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
50 log_end_msg