On Thu, Apr 24, 2008, Alain Spineux wrote: > RH/fedora use chkconfig command to enable/disable a service. > This command requires some comment in the startup script to create links > in /etc/rc.d/* > [...]
Ok, the next major version of the OpenPKG Framework (to be released soon) will contain the following change which achieves what you requested: Index: openpkg/src/openpkg.spec --- openpkg/src/openpkg.spec 745c5c16f259825e4b0e488917f4b40cef0c5397 +++ openpkg/src/openpkg.spec 47e7d7a77c3c07f1dfba36f08a23d173b00a79bb @@ -2372,13 +2372,36 @@ Provides: openpkg = %{release}-%{rel chmod 755 /etc/init.d/${name} /sbin/rc-update add ${name} default fi + elif [ -f /etc/redhat-release ]; then + sroot=/etc/rc.d/init.d + if [ ! -f $sroot/${name} ]; then + # install transfer script + ( echo "#!/bin/sh" + echo "##" + echo "## ${name} -- startup/shutdown transfer script for OpenPKG ${prefix} hierarchy" + echo "##" + echo "" + echo "# chkconfig: 2345 99 00" + echo "# description: OpenPKG ${prefix}" + echo "" + echo "[ ! -f ${prefix}/bin/openpkg ] && exit 0" + echo "case \$1 in" + echo " start ) exec ${prefix}/bin/openpkg rc all start ;;" + echo " stop ) exec ${prefix}/bin/openpkg rc all stop ;;" + echo "esac" + ) >$sroot/${name} + chmod 755 $sroot/${name} + # activate script + /sbin/chkconfig --add ${name} + /sbin/chkconfig ${name} on + fi else # sroot: script root directory # lroot: link root directory if [ -f /etc/debian_version ]; then sroot=/etc/init.d lroot=/etc/rc%%d.d - elif [ -f /etc/redhat-release -o -f /etc/mandrake-release ]; then + elif [ -f /etc/mandrake-release ]; then sroot=/etc/rc.d/init.d lroot=/etc/rc.d/rc%%d.d elif [ -f /etc/SuSE-release ]; then @@ -3160,13 +3183,17 @@ Provides: openpkg = %{release}-%{rel if [ -f /etc/gentoo-release ]; then /sbin/rc-update del ${name} >/dev/null 2>&1 rm -f /etc/init.d/${name} >/dev/null 2>&1 + elif [ -f /etc/redhat-release ]; then + /sbin/chkconfig ${name} off >/dev/null 2>&1 + /sbin/chkconfig --del ${name} >/dev/null 2>&1 + rm -f /etc/rc.d/init.d/${name} >/dev/null 2>&1 else # sroot: script root directory # lroot: link root directory if [ -f /etc/debian_version ]; then sroot=/etc/init.d lroot=/etc/rc%%d.d - elif [ -f /etc/redhat-release -o -f /etc/mandrake-release ]; then + elif [ -f /etc/mandrake-release ]; then sroot=/etc/rc.d/init.d lroot=/etc/rc.d/rc%%d.d elif [ -f /etc/SuSE-release ]; then Thanks for your feedback. Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com ______________________________________________________________________ OpenPKG http://openpkg.org User Communication List openpkg-users@openpkg.org