47 lines
846 B
Plaintext
47 lines
846 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
PREREQ=""
|
||
|
DESCRIPTION="Setting up PolicyKit actions for user '${USERNAME}'"
|
||
|
|
||
|
. /scripts/casper-functions
|
||
|
|
||
|
prereqs()
|
||
|
{
|
||
|
echo "$PREREQ"
|
||
|
}
|
||
|
|
||
|
case $1 in
|
||
|
# get pre-requisites
|
||
|
prereqs)
|
||
|
prereqs
|
||
|
exit 0
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
conf_file=${rootmnt}/etc/PolicyKit/PolicyKit.conf
|
||
|
if [ ! -f ${conf_file} ]; then
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
log_begin_msg "$DESCRIPTION"
|
||
|
|
||
|
rm -f ${conf_file}
|
||
|
cat >> ${conf_file} <<_EOF
|
||
|
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
|
||
|
|
||
|
<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
|
||
|
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">
|
||
|
|
||
|
<!-- See the manual page PolicyKit.conf(5) for file format -->
|
||
|
|
||
|
<config version="0.1">
|
||
|
<match action="org.freedesktop.hal.*">
|
||
|
<match user="${USERNAME}">
|
||
|
<return result="yes"/>
|
||
|
</match>
|
||
|
</match>
|
||
|
</config>
|
||
|
_EOF
|
||
|
|
||
|
log_end_msg
|