#!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/files/init.d-multipath-0.4.8-r1,v 1.1 2009/10/30 06:50:11 robbat2 Exp $ # Existence of this file means we are on baselayout 2. check_bl2_file='/etc/init.d/sysfs' depend() { if [ -e ${check_bl2_file} ]; then # on baselayout-1 this causes # dependency-cycles with checkroot (before *) before checkfs fsck multipathd lvm after modules device-mapper fi } # Once we are ready to stop baselayout1 support, we can just merge the addons # into here. run_addon() { local f=/lib/rcscripts/addons/$1.sh if [ -r "$f" ]; then ( . "$f" ) fi } start() { if [ ! -e ${check_bl2_file} ]; then eerror "The $SVCNAME init-script is written for baselayout-2!" eerror "Please do not use it with baselayout-1!". return 1 fi run_addon multipath-start } stop() { run_addon multipath-stop } # vim:ts=4