#!/bin/bash
hvconfig_pre()
{
hv_groupadd -g 19 haldaemon
hv_useradd -c HAL-Daemon-User -d /dev/null -u 19 \
-g haldaemon -s /bin/false haldaemon
CONFIGURE_OPTS="\
${CONFIGURE_OPTS} \
--libexecdir=/usr/lib/hal \
--localstatedir=/var \
--with-udev-prefix=/etc"
}
hvbuild_post()
{
install -v -m755 -d /var/run/hald
# Bootscript
install -v -m740 ${SCRDIR}/bootscripts/hald /etc/rc.d/init.d
# script-name start stop
bootscript_add_rc3 hald 93 19
# The default setup for HAL is to allow only certain users to invoke
# methods such as Mount(). These are the root user and the user determined
# to be at the active console using pam_console. If you are not set up to
# use Linux-PAM-1.1.1 and pam_console, create a group that is allowed to
# invoke HAL methods with the following commands:
hv_groupadd -g 61 halusers
cat > /etc/dbus-1/system.d/halusers.conf << "EOF"
EOF
# Now add the users you would like to the halusers group to use HAL:
##usermod -a -G halusers ${USERNAME}
# With the above configuration in place, authorized users now have the
# ability to unmount disk partitions mounted at non-standard locations such
# as /pub. If you'd like to restrict this policy to only drives which are
# considered removable or hotpluggable, add the following configuration
# file as the root user:
cat > /etc/hal/fdi/policy/no-fixed-drives.fdi << "EOF"
true
EOF
# If the system-wide D-BUS daemon was running during the installation of
# HAL, ensure you stop and restart the D-BUS daemon before attempting to
# start the hald daemon.
#/etc/rc.d/init.d/dbus restart
# Starting daemon
#/etc/rc.d/init.d/hal start
}