Accepting request 563489 from home:markkp:branches:Base:System

- Converted the following SysV init scripts to systemd unit files
  and scripts (bsc#1050786):
  * appldata
  * hsnc
  * vmlogrdr
  * xpram

OBS-URL: https://build.opensuse.org/request/show/563489
OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=43
This commit is contained in:
Mark Post
2018-01-11 00:30:11 +00:00
committed by Git OBS Bridge
parent b12140c3aa
commit f675d71be2
10 changed files with 111 additions and 358 deletions

View File

@@ -2,51 +2,11 @@
# Copyright (c) 2003 SUSE LINUX AG Nuernberg, Germany.
#
# Submit feedback to http://www.suse.de/feedback/
#
# /etc/init.d/appldata
#
# and symbolic its link
#
# /use/sbin/rcappldata
#
# System startup script for "Linux - z/VM Monitor Stream".
#
### BEGIN INIT INFO
# Provides: appldata
# Required-Start: $network $remote_fs
# Required-Stop: $null
# Default-Start: 3 5
# Default-Stop: 0 1 6
# Short-Description: Linux - z/VM Monitor Stream
# Description: Start the Linux - z/VM Monitor Stream
### END INIT INFO
#
# Local settings
LOCKFILE=/var/lock/appldata
CONFIGFILE=/etc/sysconfig/appldata
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num><num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
. /etc/rc.status
# First reset status of this service
rc_reset
# APPLDATA support in kernel?
if [ ! -e /proc/sys/appldata/interval ]; then
echo "No kernel support for \"Linux - z/VM Monitor Stream\"!"
exit 1
fi
# Source config file
if [ -f $CONFIGFILE ]; then
. $CONFIGFILE
@@ -59,11 +19,6 @@ RETVAL=0
start() {
echo "Starting \"Linux - z/VM Monitor Stream\" ..."
if [ -e $LOCKFILE ]; then
echo -n "(already running)"
rc_status -v
rc_exit
fi
echo -n "(interval $APPLDATA_INTERVAL milliseconds) "
echo $APPLDATA_INTERVAL > /proc/sys/appldata/interval
if [ "$APPLDATA_MEM" = "yes" ]; then
@@ -71,7 +26,7 @@ start() {
echo -n "(mem) "
modprobe appldata_mem 2>&1
if [ "$?" -ne 0 ] ; then
rc_failed 1
exit 1
else
echo 1 > /proc/sys/appldata/mem
fi
@@ -82,7 +37,7 @@ start() {
echo -n "(os) "
modprobe appldata_os 2>&1
if [ "$?" -ne 0 ]; then
rc_failed 1
exit 1
else
echo 1 > /proc/sys/appldata/os
fi
@@ -93,7 +48,7 @@ start() {
echo -n "(net_sum) "
modprobe appldata_net_sum 2>&1
if [ "$?" -ne 0 ]; then
rc_failed 1
exit 1
else
echo 1 > /proc/sys/appldata/net_sum
fi
@@ -102,7 +57,6 @@ start() {
echo -n "(timer)"
echo 1 > /proc/sys/appldata/timer
touch $LOCKFILE
rc_status -v
}
stop() {
@@ -126,12 +80,6 @@ stop() {
fi
echo -n ")"
rm -f $LOCKFILE
rc_status -v
}
restart() {
stop
start
}
status() {
@@ -171,13 +119,8 @@ case "$1" in
status)
status
;;
restart|reload)
restart
;;
*)
echo "Usage: appldata {start|stop|status|restart|reload}"
RETVAL=1
esac
exit $RETVAL