#!/bin/sh ## live-config(7) - System Configuration Scripts ## Copyright (C) 2006-2011 Daniel Baumann ## ## live-config comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it ## under certain conditions; see COPYING for details. Policykit () { # Checking if package is installed if [ ! -e /var/lib/dpkg/info/policykit-1.list ] || \ [ -e /var/lib/live/config/policykit ] then return fi echo -n " policykit" Configure_policykit } Configure_policykit () { # Grant administrative PolicyKit pivilieges to default user # Configure PolicyKit in live session mkdir -p /etc/PolicyKit cat > /etc/PolicyKit/PolicyKit.conf << EOF EOF if [ -n "${LIVE_USERNAME}" ] then cat >> /etc/PolicyKit/PolicyKit.conf << EOF EOF fi cat >> /etc/PolicyKit/PolicyKit.conf << EOF EOF mkdir -p /var/lib/polkit-1/localauthority/10-vendor.d cat > /var/lib/polkit-1/localauthority/10-vendor.d/10-live-cd.pkla << EOF # Policy to allow the livecd user to bypass policykit [Live CD user permissions] Identity=unix-user:${LIVE_USERNAME} Action=* ResultAny=no ResultInactive=no ResultActive=yes EOF # Creating state file touch /var/lib/live/config/policykit } Policykit