Created
August 4, 2012 20:04
-
-
Save ssinyagin/3259628 to your computer and use it in GitHub Desktop.
/etc/init.d/pciback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: pciback | |
# Required-Start: $syslog $remote_fs xen | |
# Required-Stop: $syslog $remote_fs xen | |
# Should-Start: drbd iscsi | |
# Should-Stop: drbd iscsi | |
# X-Start-Before: xendomains | |
# X-Stop-After: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Free PCI devices from dom0 | |
# Description: Assigns PCI devices for domU usage | |
### END INIT INFO | |
. /lib/init/vars.sh | |
. /lib/lsb/init-functions | |
[ -r /etc/default/pciback ] && . /etc/default/pciback | |
do_start() | |
{ | |
[ -n "$PCIBACK_DEVICES" ] || return | |
for d in $PCIBACK_DEVICES; do | |
/opt/scripts/pciback.sh ${d} | |
done | |
} | |
case "$1" in | |
start) | |
do_start | |
;; | |
stop) | |
;; | |
restart) | |
do_start | |
;; | |
reload|force-reload) | |
do_start | |
;; | |
*) | |
echo "Usage: $0 {start|stop|restart|reload|force-reload}" | |
exit 3 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment