- Add runlevel script for fcopy daemon in SLE11 (bnc#926534)
OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=110
This commit is contained in:
parent
ad20da1c5b
commit
a4562a9fe2
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 16 15:23:18 UTC 2015 - ohering@suse.de
|
||||
|
||||
- Add runlevel script for fcopy daemon in SLE11 (bnc#926534)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 12 09:37:40 UTC 2015 - ohering@suse.de
|
||||
|
||||
|
82
hyper-v.init.fcopy.sh
Normal file
82
hyper-v.init.fcopy.sh
Normal file
@ -0,0 +1,82 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# LSB compatible service control script; see http://www.linuxbase.org/spec/
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: hv_fcopy_daemon
|
||||
# Required-Start: $null
|
||||
# Should-Start: $syslog $remote_fs $time
|
||||
# Required-Stop: $null
|
||||
# Should-Stop: $syslog $remote_fs $time
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: hv_fcopy_daemon receives files from the host
|
||||
# Description: Start hv_fcopy_daemon to allow the host to copy files into this guest
|
||||
### END INIT INFO
|
||||
|
||||
# Check for missing binaries (stale symlinks should not happen)
|
||||
# Note: Special treatment of stop for LSB conformance
|
||||
HV_FCOPY_BIN=/usr/sbin/hv_fcopy_daemon
|
||||
test -x $HV_FCOPY_BIN || { echo "$HV_FCOPY_BIN not installed";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 5; fi; }
|
||||
|
||||
. /etc/rc.status
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting Hyper-V FCOPY daemon "
|
||||
env PATH=/usr/lib/hyper-v/bin:$PATH \
|
||||
startproc $HV_FCOPY_BIN
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down Hyper-V FCOPY daemon "
|
||||
killproc -TERM $HV_FCOPY_BIN
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart|condrestart)
|
||||
if test "$1" = "condrestart"; then
|
||||
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
||||
fi
|
||||
$0 status
|
||||
if test $? = 0; then
|
||||
$0 restart
|
||||
else
|
||||
rc_reset # Not running is not a failure.
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
## Stop the service and regardless of whether it was
|
||||
## running or not, start it again.
|
||||
$0 stop
|
||||
$0 start
|
||||
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
force-reload)
|
||||
echo -n "Reload service Hyper-V FCOPY daemon "
|
||||
$0 try-restart
|
||||
rc_status
|
||||
;;
|
||||
reload)
|
||||
rc_failed 3
|
||||
rc_status -v
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service Hyper-V FCOPY daemon "
|
||||
checkproc $HV_FCOPY_BIN
|
||||
rc_status -v
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package hyper-v
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -52,6 +52,7 @@ Source11: hyper-v.init.sh
|
||||
Source12: hyper-v.tools.hv.hv_vss_daemon.c
|
||||
Source13: hyper-v.init.vss.sh
|
||||
Source14: hyper-v.tools.hv.hv_fcopy_daemon.c
|
||||
Source15: hyper-v.init.fcopy.sh
|
||||
Source20: hyper-v.tools.hv.hv_get_dhcp_info.sh
|
||||
Source21: hyper-v.tools.hv.hv_get_dns_info.sh
|
||||
Source22: hyper-v.tools.hv.hv_set_ifconfig.sh
|
||||
@ -227,6 +228,8 @@ install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon}
|
||||
ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT${bindir}/rc%{hv_kvp_daemon}
|
||||
install -m755 %{S:13} $RPM_BUILD_ROOT/etc/init.d/%{hv_vss_daemon}
|
||||
ln -sfvbn ../../etc/init.d/%{hv_vss_daemon} $RPM_BUILD_ROOT${bindir}/rc%{hv_vss_daemon}
|
||||
install -m755 %{S:15} $RPM_BUILD_ROOT/etc/init.d/%{hv_fcopy_daemon}
|
||||
ln -sfvbn ../../etc/init.d/%{hv_fcopy_daemon} $RPM_BUILD_ROOT${bindir}/rc%{hv_fcopy_daemon}
|
||||
%endif
|
||||
|
||||
%files
|
||||
@ -289,6 +292,8 @@ then
|
||||
%{insserv_force_if_yast %{hv_kvp_daemon}}
|
||||
echo "Enabling %{hv_vss_daemon} on '${product_name}' from '${board_vendor}'"
|
||||
%{insserv_force_if_yast %{hv_vss_daemon}}
|
||||
echo "Enabling %{hv_fcopy_daemon} on '${product_name}' from '${board_vendor}'"
|
||||
%{insserv_force_if_yast %{hv_fcopy_daemon}}
|
||||
%endif
|
||||
fi
|
||||
|
||||
@ -298,6 +303,7 @@ fi
|
||||
%else
|
||||
%stop_on_removal %{hv_kvp_daemon}
|
||||
%stop_on_removal %{hv_vss_daemon}
|
||||
%stop_on_removal %{hv_fcopy_daemon}
|
||||
%endif
|
||||
|
||||
%postun
|
||||
|
Loading…
Reference in New Issue
Block a user