vp-build/templates/xbps-casper/files/scripts/casper-bottom/30policykit
Juan RP cd83917a95 xbps-casper: update to 0.3, multiple improvements.
* Remove unionfs-fuse support, it won't be used.
* Added two scripts for casper-bottom: 11keymap and 30policykit.
* It's possible now to specify the keymap and locale through
  the bootloader.
* Use the 15autologin script from now on.

--HG--
extra : convert_revision : a66369cf25a9d07369f3c8d6723b3735f4a21944
2009-10-12 18:46:43 +02:00

47 lines
846 B
Bash
Executable File

#!/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