SHA256
1
0
forked from pool/systemd
systemd/systemd-sysv-convert

147 lines
3.6 KiB
Plaintext
Raw Normal View History

#!/bin/bash
if [ "$UID" != "0" ]; then
echo Need to be root.
exit 1
fi
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
declare -A results_target
usage() {
cat << EOF
usage: systemd-sysv-convert [-h] [--save] [--show] [--apply]
SERVICE [SERVICE ...]
EOF
}
help() {
usage
cat << EOF
Save and Restore SysV Service Runlevel Information
positional arguments:
SERVICE Service names
optional arguments:
-h, --help show this help message and exit
--save Save SysV runlevel information for one or more services
--show Show saved SysV runlevel information for one or more services
--apply Apply saved SysV runlevel information for one or more services
to systemd counterparts
EOF
}
find_service() {
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
local service=$1
local rcnd=$2
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
case $rcnd in
boot.d) [ -L /etc/rc.d/$rcnd/S??boot.$service ] ;;
*) [ -L /etc/rc.d/$rcnd/S??$service ]
esac
}
lookup_database() {
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
local services=$@
local service
local runlevel
local priority
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
# 'priority' field is not used but is kept for backward compat
# reason.
while read service runlevel priority; do
for s in $services ; do
if [ $s == $service ]; then
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
results_target[$service]+=" runlevel$runlevel.target"
break
fi
done
done < /var/lib/systemd/sysv-convert/database
}
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
declare -i fail=0
case "$1" in
-h|--help)
help
exit 0
;;
--save)
shift
for service in $@ ; do
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
if [ ! -r /etc/init.d/$service ] && [ ! -r /etc/init.d/boot.$service ]; then
echo "SysV service $service does not exist, skipping"
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
continue
fi
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
for rcnd in rc2.d rc3.d rc4.d rc5.d boot.d; do
case $rcnd in
rc*.d) runlevel=${rcnd:2:1} ;;
boot.d) runlevel=3 ;;
esac
# Write a dumb priority as it is not used.
find_service $service $rcnd &&
echo "$service $runlevel 50" >>/var/lib/systemd/sysv-convert/database
done
done
;;
--show)
shift
services=$@
lookup_database $services
for service in $services; do
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
if [ -z "${results_target[$service]}" ]; then
echo "No information about service $service found." >/dev/stderr
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
let fail++
continue
fi
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
for target in ${results_target[$service]}; do
echo "SysV service '$service' is pulled by $target"
done
done
;;
--apply)
shift
services=$@
for service in $services; do
if [ ! -f "/lib/systemd/system/$service.service" -a ! -f "/usr/lib/systemd/system/$service.service" ]; then
echo systemd service $service.service does not exist. >/dev/stderr
exit 1
fi
done
#
# The database might no have been created by a previous --save
# call. This can happen when:
#
# - we're upgrading a package which initially didn't
# have any unit file nor sysv init script and now
# start shipping one or more unit files (bsc#982303).
#
# - the sysv init service wasn't enabled at all before
# being migrated to a native unit file (bsc#982211).
#
if [ -e /var/lib/systemd/sysv-convert/database ]; then
lookup_database $services
for service in $services; do
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
[ -f "/lib/systemd/system/$service.service" ] && unit="/lib/systemd/system/$service.service"
[ -f "/usr/lib/systemd/system/$service.service" ] && unit="/usr/lib/systemd/system/$service.service"
# If $service is not present in the database,
# then it simply means that the sysv init
# service was not enabled at all.
Accepting request 508561 from home:fbui:systemd:Factory - Import commit 21827ea0875ff197e16e72003b2bfaa1c6e8daad 1ad06735f core: fail when syntactically invalid values for User=/Group= fields are detected (bsc#1047023) d563972e2 timesyncd: don't use compiled-in list if FallbackNTP has been configured explicitly f4e0c16f5 gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280) e1345aac5 fix add_esp() in the gpt-auto-generator.c (#6251) c591ece9a automount: don't lstat(2) upon umount request (#6086) (bsc#1040968) 643ab2eea gpt-auto-generator: disable gpt auto logic for swaps if at least one is defined in fstab f07d2022f fstab-util: introduce fstab_has_fstype() helper bf735bb35 fstab-util: don't eat up errors in fstab_is_mount_point() a4b40fbed resolved: simplify alloc size calculation (bsc#1045290 CVE-2017-9445) 8b960bec0 only check signature job error if signature job exists (#6118) (boo#1043758) 1418bfb5b job: Ensure JobRunningTimeoutSec= survives serialization (#6128) (bsc#1004995) 19b6d5f08 udev: turn off -Wformat-nonliteral for one safe case 717ace439 udev: net_id add support for platform bus (ACPI, mostly arm64) devices (#5933) a3bf2e6b5 core/mount: pass "-c" flag to /bin/umount (#6093) - Add minimal support for boot.d/* scripts in systemd-sysv-convert (boo#1046750) While at it, the handling of the symlink priorities is also removed since it doesn't appear to be used at all. OBS-URL: https://build.opensuse.org/request/show/508561 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=980
2017-07-06 15:07:38 +02:00
for target in ${results_target[$service]}; do
echo ln -sf $unit /etc/systemd/system/$target.wants/$service.service >/dev/stderr
mkdir -p "/etc/systemd/system/$target.wants"
/bin/ln -sf $unit /etc/systemd/system/$target.wants/$service.service
done
done
fi
;;
*)
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
let fail=2
;;
esac
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
exit $fail