Initial s390-tools-2.0.0 import

This commit is based on the s390-tools-1.39.0 version.

Changes on top of s390-tools-1.39.0:

 - Add MIT license to all source files
 - Add LICENSE file
 - Transform REAMDE to README.md (markdown)
 - Add AUTHORS.md file
 - Add CONTRIBUTING.md file
 - Move changelog from README to CHANGELOG.md file

Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
Michael Holzheu
2017-08-07 16:13:17 +02:00
commit b627b8d8e1
647 changed files with 168974 additions and 0 deletions

45
systemd/Makefile Normal file
View File

@@ -0,0 +1,45 @@
include ../common.mak
SYSTEM_UNITS = ttyrun-getty@.service iucvtty-login@.service \
cpacfstatsd.service cpuplugd.service \
dumpconf.service cpi.service \
mon_fsstatd.service mon_procd.service
all:
system_units: $(SYSTEM_UNITS)
check:
ifneq (${SYSTEMDSYSTEMUNITDIR},)
install: system_units
for unit in $(SYSTEM_UNITS); do \
$(INSTALL) -g $(GROUP) -o $(OWNER) \
-m 644 $$unit $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) ; \
done
# For systemd install dumpconf to TOOLS_LIBDIR
$(INSTALL) -m 755 ../etc/init.d/dumpconf $(DESTDIR)$(TOOLS_LIBDIR)
else
install:
endif
clean:
rm -f $(SYSTEM_UNITS)
%: %.in
real_bin_dir=$(BINDIR); \
real_usrbin_dir=$(USRBINDIR); \
real_usrsbin_dir=$(USRSBINDIR); \
real_toolslib_dir=$(TOOLS_LIBDIR); \
$(SED) -e "s#@bin_path@#$$real_bin_dir#g" \
-e "s#@usrbin_path@#$$real_usrbin_dir#g" \
-e "s#@usrsbin_path@#$$real_usrsbin_dir#g" \
-e "s#@toolslib_path@#$$real_toolslib_dir#g" \
-e 's#@S390_TOOLS_RELEASE@#$(S390_TOOLS_RELEASE)#g' \
< $< > $@
.PHONY: all check install clean system_units

View File

@@ -0,0 +1,22 @@
#
# Systemd unit for starting cpacfstatsd daemon for Linux on System z
#
# Copyright IBM Corp. 2015, 2017
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
[Unit]
Description=CPACF statistics collection daemon process for Linux on System z
Documentation=man:cpacfstatsd(8)
[Service]
Type=forking
ExecStart=@usrsbin_path@/cpacfstatsd
PIDFile=/var/run/cpacfstatsd.pid
KillMode=process
Restart=no
[Install]
WantedBy=multi-user.target

46
systemd/cpi.service.in Normal file
View File

@@ -0,0 +1,46 @@
# Service unit to apply control program identification (CPI) settings
#
# Copyright IBM Corp. 2017
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
[Unit]
Description=Apply Control Program Identification (CPI)
DefaultDependencies=no
Conflicts=shutdown.target
After=local-fs.target
ConditionPathIsReadWrite=/sys/firmware/cpi
[Service]
Type=oneshot
#
# Specify a file with the environment variables using the EnvironmentFile=
# service property.
#
EnvironmentFile=/etc/sysconfig/cpi
#
# Alternatively, you can specify the environment variables directly,
# using the Environment= service properties, which can be overridden by
# "systemctl edit --full cpi".
# In this case, the EnvironmentFile= needs to be commented out, otherwise
# it would override the directly specified variables.
#
# The sysplex name, system name, and system type consist of up to eight
# characters of the following set: A-Z, 0-9, $, @, #, and blank.
#
# Environment=CPI_SYSTEM_NAME=
# Environment=CPI_SYSPLEX_NAME=
# Environment=CPI_SYSTEM_LEVEL=
# Environment=CPI_SYSTEM_TYPE=LINUX
#
# Apply settings
ExecStartPre=/bin/sh -c 'if test -n "$CPI_SYSTEM_TYPE"; then echo $CPI_SYSTEM_TYPE |tr a-z A-Z > /sys/firmware/cpi/system_type; fi'
ExecStartPre=/bin/sh -c 'if test -n "$CPI_SYSTEM_NAME"; then echo $CPI_SYSTEM_NAME |tr a-z A-Z > /sys/firmware/cpi/system_name; fi'
ExecStartPre=/bin/sh -c 'if test -n "$CPI_SYSPLEX_NAME"; then echo $CPI_SYSPLEX_NAME |tr a-z A-Z > /sys/firmware/cpi/sysplex_name; fi'
ExecStartPre=/bin/sh -c 'test -n "$CPI_SYSTEM_LEVEL" || CPI_SYSTEM_LEVEL="$(uname -r)" ; echo $CPI_SYSTEM_LEVEL |cut -d- -f1 | tr . " " |xargs printf "0x0000000000%02x%02x%02x\n" > /sys/firmware/cpi/system_level'
#
# Sending data to the HMC/SE
ExecStart=/bin/sh -c 'echo 1 > /sys/firmware/cpi/set'

View File

@@ -0,0 +1,22 @@
#
# Systemd unit for the CPU and memory hotplug daemon for Linux on z Systems
#
# Copyright IBM Corp. 2016, 2017
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
[Unit]
Description=CPU hotplug daemon for Linux on System z
Documentation=man:cpuplugd(8) man:cpuplugd.conf(5)
After=remote-fs.target
[Service]
ExecStart=@usrsbin_path@/cpuplugd -f -c /etc/cpuplugd.conf
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Type=simple
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,21 @@
#
# Systemd unit for configuring dump on panic for System z
#
# Copyright IBM Corp. 2017
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
[Unit]
Description=Configure dump on panic for System z
After=network.target
[Service]
Type=oneshot
ExecStart=@toolslib_path@/dumpconf start
ExecStop=@toolslib_path@/dumpconf stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,31 @@
# Systemd unit for starting iucvtty instances.
#
# The instance ID corresponds to the terminal identifier for the iucvtty
# instance.
#
# Copyright IBM Corp. 2014, 2017
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
[Unit]
Description=iucvtty login for terminal ID %I
Documentation=man:iucvtty(1) man:iucvconn(1) man:login(1)
After=systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service
Before=getty.target
Conflicts=rescue.service
IgnoreOnIsolate=yes
[Service]
ExecStart=-@usrbin_path@/iucvtty %I
KillMode=process
Restart=always
RestartSec=0
IgnoreSIGPIPE=no
SendSIGHUP=yes
[Install]
WantedBy=getty.target

View File

@@ -0,0 +1,39 @@
#
# Systemd unit for mon_fsstatd (monitor z/VM guest file systems)
#
# Copyright IBM Corp. 2017
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
[Unit]
Description=Monitor z/VM guest file system size
Documentation=man:mon_fsstatd(8)
ConditionVirtualization=zvm
After=remote-fs.target
[Service]
#
# Specify a file with the environment variables using the EnvironmentFile=
# service property.
#
EnvironmentFile=/etc/sysconfig/mon_fsstatd
#
# Alternatively, you can specify the environment variables directly,
# using the Environment= service property, which can be overridden by
# "systemctl edit --full mon_fsstatd".
# In this case, the EnvironmentFile= needs to be commented out, otherwise
# it would override the directly specified variables.
#
#Environment=FSSTAT_INTERVAL=30
ExecStartPre=-/sbin/modprobe monwriter
ExecStartPre=/sbin/udevadm settle --timeout=10
ExecStart=@usrsbin_path@/mon_fsstatd -a -i $FSSTAT_INTERVAL
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Type=simple
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,39 @@
#
# Systemd unit for mon_procd (monitor z/VM guest processes)
#
# Copyright IBM Corp. 2017
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
[Unit]
Description=Monitor Linux on z/VM processes
Documentation=man:mon_procd(8)
ConditionVirtualization=zvm
After=remote-fs.target
[Service]
#
# Specify a file with the environment variables using the EnvironmentFile=
# service property.
#
EnvironmentFile=/etc/sysconfig/mon_procd
#
# Alternatively, you can specify the environment variables directly,
# using the Environment= service property, which can be overridden by
# "systemctl edit --full mon_procd".
# In this case, the EnvironmentFile= needs to be commented out, otherwise
# it would override the directly specified variables.
#
#Environment=PROC_INTERVAL=30
ExecStartPre=-/sbin/modprobe monwriter
ExecStartPre=/sbin/udevadm settle --timeout=10
ExecStart=@usrsbin_path@/mon_procd -a -i $PROC_INTERVAL
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Type=simple
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,35 @@
#
# Systemd unit to start getty programs if a terminal is available using
# the ttyrun program
#
# Copyright IBM Corp. 2014, 2017
#
# s390-tools is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
#
[Unit]
Description=TTYRun on %I
Documentation=man:ttyrun(8) man:agetty(8)
BindTo=dev-%i.device
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service
Before=getty.target
IgnoreOnIsolate=yes
[Service]
Environment=TERM=linux
ExecStart=-@bin_path@/ttyrun %I /sbin/agetty -L 115200,38400,9600 %I
IgnoreSIGPIPE=no
KillMode=process
Restart=always
RestartSec=0
SendSIGHUP=yes
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
UtmpIdentifier=%I
[Install]
WantedBy=getty.target