systemd/systemd-sysv-install

42 lines
987 B
Plaintext
Raw Normal View History

#!/bin/sh
Accepting request 437403 from home:fbui:systemd:Factory - Own a couple of directories even if they don't belong to systemd otherwise the build system will complain. Some directories (owned by others packages) are simply used by systemd to ship some scripts or config files to customize others *optional* components. Since thos components are not build required by systemd those directories are not owned by any packages and the BS complains... - Import commit 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) - %sysusers_create and %tmpfiles_create must be called in %post Calling %pre is broken since the respective conf files are not yet installed. - %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are part of systemd-journal-remote package (only). - systemd-journal-{gatewayd,remote,upload} units are only part of "systemd-journal-remote" package. So exclude them from the main package. - Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" 3760c10 manager: tighten incoming notification message checks d6efd71 core: only warn on short reads on signal fd 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones OBS-URL: https://build.opensuse.org/request/show/437403 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=959
2016-10-26 16:59:15 +02:00
# 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() {
Accepting request 437403 from home:fbui:systemd:Factory - Own a couple of directories even if they don't belong to systemd otherwise the build system will complain. Some directories (owned by others packages) are simply used by systemd to ship some scripts or config files to customize others *optional* components. Since thos components are not build required by systemd those directories are not owned by any packages and the BS complains... - Import commit 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) - %sysusers_create and %tmpfiles_create must be called in %post Calling %pre is broken since the respective conf files are not yet installed. - %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are part of systemd-journal-remote package (only). - systemd-journal-{gatewayd,remote,upload} units are only part of "systemd-journal-remote" package. So exclude them from the main package. - Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" 3760c10 manager: tighten incoming notification message checks d6efd71 core: only warn on short reads on signal fd 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones OBS-URL: https://build.opensuse.org/request/show/437403 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=959
2016-10-26 16:59:15 +02:00
echo "Usage: $0 [--root=path] enable|disable|is-enabled <sysv script name>" >&2
exit 1
}
Accepting request 437403 from home:fbui:systemd:Factory - Own a couple of directories even if they don't belong to systemd otherwise the build system will complain. Some directories (owned by others packages) are simply used by systemd to ship some scripts or config files to customize others *optional* components. Since thos components are not build required by systemd those directories are not owned by any packages and the BS complains... - Import commit 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) - %sysusers_create and %tmpfiles_create must be called in %post Calling %pre is broken since the respective conf files are not yet installed. - %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are part of systemd-journal-remote package (only). - systemd-journal-{gatewayd,remote,upload} units are only part of "systemd-journal-remote" package. So exclude them from the main package. - Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" 3760c10 manager: tighten incoming notification message checks d6efd71 core: only warn on short reads on signal fd 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones OBS-URL: https://build.opensuse.org/request/show/437403 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=959
2016-10-26 16:59:15 +02:00
# parse options
eval set -- "$(getopt -o r: --long root: -- "$@")"
while true; do
Accepting request 437403 from home:fbui:systemd:Factory - Own a couple of directories even if they don't belong to systemd otherwise the build system will complain. Some directories (owned by others packages) are simply used by systemd to ship some scripts or config files to customize others *optional* components. Since thos components are not build required by systemd those directories are not owned by any packages and the BS complains... - Import commit 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) - %sysusers_create and %tmpfiles_create must be called in %post Calling %pre is broken since the respective conf files are not yet installed. - %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are part of systemd-journal-remote package (only). - systemd-journal-{gatewayd,remote,upload} units are only part of "systemd-journal-remote" package. So exclude them from the main package. - Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" 3760c10 manager: tighten incoming notification message checks d6efd71 core: only warn on short reads on signal fd 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones OBS-URL: https://build.opensuse.org/request/show/437403 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=959
2016-10-26 16:59:15 +02:00
case "$1" in
-r|--root)
ROOT="$2"
shift 2 ;;
--) shift ; break ;;
*) usage ;;
esac
done
Accepting request 437403 from home:fbui:systemd:Factory - Own a couple of directories even if they don't belong to systemd otherwise the build system will complain. Some directories (owned by others packages) are simply used by systemd to ship some scripts or config files to customize others *optional* components. Since thos components are not build required by systemd those directories are not owned by any packages and the BS complains... - Import commit 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) - %sysusers_create and %tmpfiles_create must be called in %post Calling %pre is broken since the respective conf files are not yet installed. - %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are part of systemd-journal-remote package (only). - systemd-journal-{gatewayd,remote,upload} units are only part of "systemd-journal-remote" package. So exclude them from the main package. - Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" 3760c10 manager: tighten incoming notification message checks d6efd71 core: only warn on short reads on signal fd 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones OBS-URL: https://build.opensuse.org/request/show/437403 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=959
2016-10-26 16:59:15 +02:00
NAME="$2"
[ -n "$NAME" ] || usage
Accepting request 437403 from home:fbui:systemd:Factory - Own a couple of directories even if they don't belong to systemd otherwise the build system will complain. Some directories (owned by others packages) are simply used by systemd to ship some scripts or config files to customize others *optional* components. Since thos components are not build required by systemd those directories are not owned by any packages and the BS complains... - Import commit 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) - %sysusers_create and %tmpfiles_create must be called in %post Calling %pre is broken since the respective conf files are not yet installed. - %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are part of systemd-journal-remote package (only). - systemd-journal-{gatewayd,remote,upload} units are only part of "systemd-journal-remote" package. So exclude them from the main package. - Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" 3760c10 manager: tighten incoming notification message checks d6efd71 core: only warn on short reads on signal fd 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones OBS-URL: https://build.opensuse.org/request/show/437403 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=959
2016-10-26 16:59:15 +02:00
case "$1" in
Accepting request 437403 from home:fbui:systemd:Factory - Own a couple of directories even if they don't belong to systemd otherwise the build system will complain. Some directories (owned by others packages) are simply used by systemd to ship some scripts or config files to customize others *optional* components. Since thos components are not build required by systemd those directories are not owned by any packages and the BS complains... - Import commit 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) - %sysusers_create and %tmpfiles_create must be called in %post Calling %pre is broken since the respective conf files are not yet installed. - %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are part of systemd-journal-remote package (only). - systemd-journal-{gatewayd,remote,upload} units are only part of "systemd-journal-remote" package. So exclude them from the main package. - Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" 3760c10 manager: tighten incoming notification message checks d6efd71 core: only warn on short reads on signal fd 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones OBS-URL: https://build.opensuse.org/request/show/437403 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=959
2016-10-26 16:59:15 +02:00
enable)
chkconfig $ROOT --no-systemctl -s "$NAME" on
;;
disable)
chkconfig $ROOT --no-systemctl -s "$NAME" off
;;
is-enabled)
chkconfig $ROOT --no-systemctl -c "$NAME"
;;
*)
usage ;;
esac