From 05ece0ade3577646c1055ed573d0cbb5ff9b06f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Thu, 22 Feb 2018 19:50:11 +0100 Subject: main/openrc: move loadkmap service to busybox-initscripts --- .../busybox-initscripts.post-install | 45 ++++++++++++++++------ 1 file changed, 34 insertions(+), 11 deletions(-) (limited to 'main/busybox-initscripts/busybox-initscripts.post-install') diff --git a/main/busybox-initscripts/busybox-initscripts.post-install b/main/busybox-initscripts/busybox-initscripts.post-install index fab24cac62..424c6ddb09 100644 --- a/main/busybox-initscripts/busybox-initscripts.post-install +++ b/main/busybox-initscripts/busybox-initscripts.post-install @@ -9,18 +9,41 @@ if [ -L /etc/runlevels/boot/mdev ] && ! [ -L /etc/runlevels/sysinit/mdev ]; then mv /etc/runlevels/boot/mdev /etc/runlevels/sysinit/ 2>/dev/null fi +rename_service() { + oldname="$1" + newname="$2" + + ret=1 + for link in /run/openrc/*/${oldname} /etc/runlevels/*/${oldname}; do + newlink="${link%/*}/${newname}" + if [ -L "$link" ] && ! [ -L "$newlink" ]; then + target="$(readlink $link)" + ln -s "${target%/*}/$newname" "$newlink" + rm "$link" + ret=0 + continue + fi + if [ -d "$link" ] && ! [ -d "$newlink" ]; then + mv "$link" "$newlink" + ret=0 + fi + done + + return $ret +} + # cron was renamed to crond -for link in /run/openrc/*/cron /etc/runlevels/*/cron; do - if [ -L "$link" ] && ! [ -L "${link}d" ]; then - target="$(readlink $link)" - ln -s "${target}d" "${link}d" - rm "$link" - continue - fi - if [ -d "$link" ] && ! [ -d "${link}d" ]; then - mv "$link" "${link}d" - fi -done +rename_service cron crond + +# keymaps was renamed to loadkmap +rename_service keymaps loadkmap && cat 1>&2 <<-EOF +* +* The OpenRC keymaps service was renamed to loadkmap. You might want +* to rename your previous configuration file /etc/conf.d/keymaps to +* /etc/conf.d/loadkamp. Also make sure that /etc/init.d/keymaps was +* removed and remove it manually if it wasn't. +* +EOF exit 0 -- cgit v1.2.3