summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2018-09-17 11:09:41 +0200
committerDan Horák <dan@danny.cz>2018-09-17 11:09:41 +0200
commit503c73ca1ea7c420047c86aea115c49c4cad7f06 (patch)
treeed2c964ec3bf1238bb2feeeb64e0223614a9e2b9
parentd6d15e6c09da3f10600aa24ce90e4b418a4897ad (diff)
downloadutils-503c73ca1ea7c420047c86aea115c49c4cad7f06.tar.gz
utils-503c73ca1ea7c420047c86aea115c49c4cad7f06.tar.xz
utils-503c73ca1ea7c420047c86aea115c49c4cad7f06.zip
cpi service is now in upstream
-rw-r--r--cpi.initd130
-rw-r--r--cpi.sysconfig5
2 files changed, 0 insertions, 135 deletions
diff --git a/cpi.initd b/cpi.initd
deleted file mode 100644
index 80977fb..0000000
--- a/cpi.initd
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/bin/sh
-#
-# Copyright 2009 Red Hat, Inc.
-# License: GPLv2
-# Author: Dan Horák <dhorak@redhat.com>
-#
-# cpi Set Control Program Identification on IBM zSeries
-#
-# chkconfig: 12345 80 20
-# description: Set Control Program Identification on IBM zSeries \
-# that's reported on a Linux LPAR
-
-### BEGIN INIT INFO
-# Provides: cpi
-# Required-Start:
-# Required-Stop:
-# Should-Start:
-# Should-Stop:
-# Default-Start: 1 2 3 4 5
-# Default-Stop: 0 6
-# Short-Description: Set control program identification on IBM zSeries
-# Description: Set Control Program Identification on IBM zSeries \
-# that's reported on a Linux LPAR
-### END INIT INFO
-
-# Source function library.
-. /etc/init.d/functions
-
-prog="cpi"
-
-[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
-
-cpipath=/sys/firmware/cpi
-
-start() {
- [ `id -u` -eq 0 ] || return 4
-
- echo -n $"Starting $prog: "
-
- if [ -d $cpipath ]; then
- retval=0
- echo LINUX > $cpipath/system_type 2> /dev/null || retval=1
- [ $retval -eq 0 ] && echo "$SYSTEM_NAME" > $cpipath/system_name 2> /dev/null || retval=1
- [ $retval -eq 0 ] && echo "$SYSPLEX_NAME" > $cpipath/sysplex_name 2> /dev/null || retval=1
- level_maj=`uname -r | cut -d '-' -f 1 | cut -d '.' -f 1`
- level_min=`uname -r | cut -d '-' -f 1 | cut -d '.' -f 2`
- level_mic=`uname -r | cut -d '-' -f 1 | cut -d '.' -f 3`
- level=`printf '%02x%02x%02x' $level_maj $level_min $level_mic`
- [ $retval -eq 0 ] && echo $level > $cpipath/system_level 2> /dev/null || retval=1
-
- [ $retval -eq 0 ] && echo 1 > $cpipath/set 2> /dev/null || retval=1
- else
- retval=1
- fi
-
- [ $retval -eq 0 ] && success || failure
- echo
- return $retval
-}
-
-stop() {
- echo -n $"Stopping $prog: "
-
- # nothing to do
- success
- echo
- return 0
-}
-
-restart() {
- stop
- start
-}
-
-reload() {
- restart
-}
-
-force_reload() {
- restart
-}
-
-rh_status() {
- if [ -d $cpipath ]; then
- echo -n "System type: "; cat $cpipath/system_type
- echo -n "System level: "; cat $cpipath/system_level
- echo -n "System name: "; cat $cpipath/system_name
- echo -n "Sysplex name: "; cat $cpipath/sysplex_name
- retval=0
- else
- echo "Control Program Identification system interface doesn't exist."
- retval=1
- fi
- return $retval
-}
-
-rh_status_q() {
- rh_status >/dev/null 2>&1
-}
-
-
-case "$1" in
- start)
- $1
- ;;
- stop)
- $1
- ;;
- restart)
- $1
- ;;
- reload)
- rh_status_q || exit 7
- $1
- ;;
- force-reload)
- force_reload
- ;;
- status)
- rh_status
- ;;
- condrestart|try-restart)
- rh_status_q || exit 0
- restart
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
- exit 2
-esac
-exit $?
diff --git a/cpi.sysconfig b/cpi.sysconfig
deleted file mode 100644
index 22f7bc3..0000000
--- a/cpi.sysconfig
+++ /dev/null
@@ -1,5 +0,0 @@
-# Define a system name (8 chars maximum)
-SYSTEM_NAME=
-
-# Define a sysplex name (8 chars maximum)
-SYSPLEX_NAME=