diff options
author | Karel Kočí <cynerd@email.cz> | 2022-03-11 11:45:26 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-03-11 11:45:26 +0100 |
commit | 403d4e98cadc69a238060cce2614537f94a76ba9 (patch) | |
tree | 2c2d5aad6635b564f8a13620de7adddbb523fb65 /updater-ng/files/cleanup_rc_d.sh | |
parent | 7abc9df811cbf5f74d5d9f56dfc4f1fb906ca84d (diff) | |
download | openwrt-personal-pkgs-403d4e98cadc69a238060cce2614537f94a76ba9.tar.gz openwrt-personal-pkgs-403d4e98cadc69a238060cce2614537f94a76ba9.tar.bz2 openwrt-personal-pkgs-403d4e98cadc69a238060cce2614537f94a76ba9.zip |
updater-ng: remove for now as I do not need it right now
Diffstat (limited to 'updater-ng/files/cleanup_rc_d.sh')
-rwxr-xr-x | updater-ng/files/cleanup_rc_d.sh | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/updater-ng/files/cleanup_rc_d.sh b/updater-ng/files/cleanup_rc_d.sh deleted file mode 100755 index 9df8015..0000000 --- a/updater-ng/files/cleanup_rc_d.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -set -eu - -cd "$ROOT_DIR/etc/rc.d" - -# Remove any dangling links -for rc in *; do - [ -L "$rc" ] || continue - [ -f "$rc" ] || { - echo "Removing enable for non-existent service: $rc" >&2 - rm -f "$rc" - } -done - -# Fix multiple links for same service -# We list here all links and do two passes. First we just remove number and filter -# out only duplicates. This way we have problematic services but to get name only -# once we have to remove leading 'S' or 'K' and do second pass. This way we have -# just list of all problematic services. -find -maxdepth 1 -type l \ - | sed 's|\./\([SK]\)..|\1|' | sort | uniq -d \ - | sed 's|[SK]||' | sort | uniq \ - | while read -r service; do - echo "Fixing multiple startup/shutdown links for service: $service" >&2 - rm -f [SK]??"$service" - /bin/sh "$ROOT_DIR/etc/rc.common" "$ROOT_DIR/etc/init.d/$service" enable -done |