From: root Date: Fri, 1 Apr 2011 20:58:20 +0000 (+0200) Subject: Merge commit 'origin/master' X-Git-Tag: nodemanager-2.0-32~6 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=cdc2396b04e5de401e75a57b27ed963a2f2663a4;hp=7ef1a21b48fdb7d859db28999c18022916781f49;p=nodemanager.git Merge commit 'origin/master' --- diff --git a/sliver-initscripts/initscript-template.sh b/sliver-initscripts/initscript-template.sh new file mode 100644 index 0000000..72c8d59 --- /dev/null +++ b/sliver-initscripts/initscript-template.sh @@ -0,0 +1,38 @@ +#!/bin/bash +command=$1; shift +slicename=$1; shift + +# that can make sense if needed +# source /etc/init.d/functions + +# a reasonably tested function for installing with yum +function yum_install () { + pkg="$1"; shift + while true; do + rpm -q $pkg && break + sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY + sudo yum -y install $pkg + sleep 10 + done + echo $pkg installed +} + +#################### +function start () { + +} +function stop () { + +} + +#################### +function restart () { + stop + start +} +case $command in +start) start ;; +stop) stop ;; +restart) restart ;; +*) echo "Unknown command in initscript $command for slice $slicename" ;; +esac