From 355f700b49fc046ba35f68760b789cdfe8ad29d8 Mon Sep 17 00:00:00 2001 From: autodist Date: Sat, 30 Dec 2023 11:36:54 +0100 Subject: [PATCH] Release 224-2mamba --- systemd-sysv-install | 47 ++++++++++++++++++++++++++++++++++++++++++++ systemd.spec | 10 ++++++++-- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 systemd-sysv-install diff --git a/systemd-sysv-install b/systemd-sysv-install new file mode 100644 index 0000000..8259a85 --- /dev/null +++ b/systemd-sysv-install @@ -0,0 +1,47 @@ +#!/bin/sh +# This script is called by "systemctl enable/disable" when the given unit is a +# SysV init.d script. It needs to call the distribution's mechanism for +# enabling/disabling those, such as chkconfig, update-rc.d, or similar. This +# can optionally take a --root argument for enabling a SysV init script +# in a chroot or similar. +set -e + +usage() { + echo "Usage: $0 [--root=path] enable|disable|is-enabled " >&2 + exit 1 +} + +# parse options +eval set -- "$(getopt -o r: --long root: -- "$@")" +while true; do + case "$1" in + -r|--root) + ROOT="$2" + shift 2 ;; + --) shift ; break ;; + *) usage ;; + esac +done + +NAME="$2" +[ -n "$NAME" ] || usage + +case "$1" in + enable) + # call the command to enable SysV init script $NAME here + # (consider optional $ROOT) + [ -e /lib/systemd/system/$NAME.service ] || /sbin/chkconfig $NAME on + ;; + disable) + # call the command to disable SysV init script $NAME here + # (consider optional $ROOT) + [ -e /lib/systemd/system/$NAME.service ] || /sbin/chkconfig $NAME off + ;; + is-enabled) + # exit with 0 if $NAME is enabled, non-zero if it is disabled + # (consider optional $ROOT) + [ -e /lib/systemd/system/$NAME.service ] || /sbin/chkconfig $NAME + ;; + *) + usage ;; +esac diff --git a/systemd.spec b/systemd.spec index 23f567f..ae1ae6b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -25,7 +25,7 @@ Name: systemd Epoch: 2 Version: 224 -Release: 1mamba +Release: 2mamba Summary: A system and service manager compatible with SysV and LSB init scripts Group: System/Configuration Vendor: openmamba @@ -43,6 +43,7 @@ Source13: udev-blacklist Source14: udev-ifupdown.rules Source15: udev-post-initscript Source16: udev-sysconfig +Source17: systemd-sysv-install Patch0: systemd-191-upstream-build-fix.patch Patch1: systemd-197-revert-only-add-support.patch Patch2: systemd-198-lock-to-tty-group-openmamba.patch @@ -57,7 +58,7 @@ Patch10: systemd-218-glibc-2.19.patch Patch11: systemd-219-rework_device_state_logic.patch Patch12: systemd-219-upstream_dont_change_devices_state_to_tentative.patch Patch13: systemd-219-upstream_do_not_spawn_jobs_or_during_coldplug.patch -Patch14: systemd-219-silend-about-device-appeared-twice.patch +Patch14: systemd-219-silend-about-device-appeared-twice.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -286,6 +287,8 @@ ln -s /proc/mounts %{buildroot}%{_sysconfdir}/mtab # install libnss_myhostname.so.* to /%{lib} mv %{buildroot}%{_libdir}/libnss_myhostname.so.* %{buildroot}/%{_lib}/ +# install our systemd-sysv-install +install -D -m0755 %{SOURCE17} %{buildroot}/lib/systemd/systemd-sysv-install %find_lang %{name} %clean @@ -655,6 +658,9 @@ fi %{_datadir}/pkgconfig/udev.pc %changelog +* Tue Aug 18 2015 Silvan Calarco 224-2mamba +- add systemd-sysv-install + * Tue Aug 04 2015 Automatic Build System 224-1mamba - automatic version update by autodist