Due to huge amount of bots taking interest in registering here registration is now invite-only. Any user can make an invite, you need to create it here and give resulting link to someone to register.
avatar
abondrov has added fa3e5f0aab
Add script to handle old init scripts
view file @ fa3e5f0aab
... ... --- /dev/null
... ... +++ b/systemd-sysv-install
... ... @@ -0,0 +1,51 @@
1
#!/bin/sh
2
# This script is called by "systemctl enable/disable" when the given unit is a
3
# SysV init.d script. It needs to call the distribution's mechanism for
4
# enabling/disabling those, such as chkconfig, update-rc.d, or similar. This
5
# can optionally take a --root argument for enabling a SysV init script
6
# in a chroot or similar.
7
set -e
8
9
usage() {
10
    echo "Usage: $0 [--root=path] enable|disable|is-enabled <sysv script name>" >&2
11
    exit 1
12
}
13
14
# parse options
15
eval set -- "$(getopt -o r: --long root: -- "$@")"
16
while true; do
17
    case "$1" in
18
        -r|--root)
19
            ROOT="$2"
20
            shift 2 ;;
21
        --) shift ; break ;;
22
        *) usage ;;
23
    esac
24
done
25
26
if [ -n "$ROOT" ] && [ "$ROOT" != "/" ]; then
27
    CHROOT="chroot '$ROOT'"
28
fi
29
30
NAME="$2"
31
[ -n "$NAME" ] || usage
32
33
case "$1" in
34
    enable)
35
        # call the command to enable SysV init script $NAME here
36
        # (consider optional $ROOT)
37
        $CHROOT /sbin/chkconfig --add $NAME
38
        ;;
39
    disable)
40
        # call the command to disable SysV init script $NAME here
41
        # (consider optional $ROOT)
42
        $CHROOT /sbin/chkconfig --del $NAME
43
        ;;
44
    is-enabled)
45
        # exit with 0 if $NAME is enabled, non-zero if it is disabled
46
        # (consider optional $ROOT)
47
	ls $ROOT/etc/rc.d/rc[S5].d/S??$NAME >/dev/null 2>/dev/null
48
        ;;
49
    *)
50
        usage ;;
51
esac
... ... --- a/systemd.spec
... ... +++ b/systemd.spec
... ... @@ -27,11 +27,12 @@
27 27
Summary:	A System and Session Manager
28 28
Name:		systemd
29 29
Version:	230
30
Release:	5
30
Release:	6
31 31
License:	GPLv2+
32 32
Group:		System/Configuration/Boot and Init
33 33
Url:		http://www.freedesktop.org/wiki/Software/systemd
34 34
Source0:	http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
35
Source1:	systemd-sysv-install
35 36
Source2:	50-udev-mandriva.rules
36 37
Source3:	69-printeracl.rules
37 38
Source5:	udev.sysconfig
... ... @@ -975,6 +976,9 @@ install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/rsyslog.d/
976 976
# (tpg) by default enable SysRq
977 977
sed -i -e 's/^#*kernel.sysrq = [0-9]\+/kernel.sysrq = 1/' %{buildroot}/usr/lib/sysctl.d/50-default.conf
978 978
979
# Install script to handle old init scripts
980
install -m 0755 %{SOURCE1} %{buildroot}%{systemd_libdir}/systemd-sysv-install
981
979 982
# (tpg) from mageia
980 983
# automatic systemd release on rpm installs/removals
981 984
# (see http://wiki.mandriva.com/en/Rpm_filetriggers)

Comments