diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-06-16 13:20:15 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-06-16 13:20:15 +0800 |
commit | 9305b2d3edfc58ebcbd565a5aeea7d26ab689b2d (patch) | |
tree | 64c0e71dd0c168097d00199110cbed98253eab45 /sysutils/hal | |
parent | 9f77ba3e09270156a15e0ff9694b49b084857a06 (diff) | |
download | marcuscom-ports-9305b2d3edfc58ebcbd565a5aeea7d26ab689b2d.tar marcuscom-ports-9305b2d3edfc58ebcbd565a5aeea7d26ab689b2d.tar.gz marcuscom-ports-9305b2d3edfc58ebcbd565a5aeea7d26ab689b2d.tar.bz2 marcuscom-ports-9305b2d3edfc58ebcbd565a5aeea7d26ab689b2d.tar.lz marcuscom-ports-9305b2d3edfc58ebcbd565a5aeea7d26ab689b2d.tar.xz marcuscom-ports-9305b2d3edfc58ebcbd565a5aeea7d26ab689b2d.tar.zst marcuscom-ports-9305b2d3edfc58ebcbd565a5aeea7d26ab689b2d.zip |
Create a wrapper around force_depend that will work for rc.d scripts
installed in LOCALBASE.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6454 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/hal')
-rw-r--r-- | sysutils/hal/files/hald.in | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sysutils/hal/files/hald.in b/sysutils/hal/files/hald.in index 0629cf0f2..aefba2194 100644 --- a/sysutils/hal/files/hald.in +++ b/sysutils/hal/files/hald.in @@ -24,16 +24,30 @@ pidfile="/var/run/${name}/${name}.pid" stop_postcmd="hald_postcmd" start_precmd="hald_precmd" +local_force_depend() +{ + _depend="$1" + if [ -f %%LOCALBASE%%/etc/rc.d/${_depend}.sh ]; then + _depend="${_depend}.sh" + fi + + if ! %%LOCALBASE%%/etc/rc.d/${_depend} forcestatus 1>/dev/null 2>&1 && + ! %%LOCALBASE%%/etc/rc.d/${_depend} forcestart; then + return 1 + fi + return 0 +} + hald_precmd() { if ! checkyesno dbus_enable then - force_depend dbus || return 1 + local_force_depend dbus || return 1 fi if ! checkyesno polkitd_enable then - force_depend polkitd || return 1 + local_force_depend polkitd || return 1 fi mkdir -p $(dirname $pidfile) |