From 95e7eb7afe216b576c627aec8010c34b27555e13 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 3 Jun 2015 07:51:41 +0200 Subject: Added core-services/98-sbin-merge scriptlet to create usr/sbin symlink. This checks if /usr/sbin is a real directory and then moves it to /usr/sbin.old if there are only symlinks, and then the /usr/sbin -> /usr/bin symlink is created. --- core-services/98-sbin-merge.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 core-services/98-sbin-merge.sh (limited to 'core-services') diff --git a/core-services/98-sbin-merge.sh b/core-services/98-sbin-merge.sh new file mode 100644 index 0000000..df8629f --- /dev/null +++ b/core-services/98-sbin-merge.sh @@ -0,0 +1,11 @@ +if [ -d /usr/sbin -a ! -L /usr/sbin ]; then + for f in /usr/sbin/*; do + if [ -f $f -a ! -L $f ]; then + msg "Detected $f file, can't create /usr/sbin symlink." + return 0 + fi + done + msg "Creating /usr/sbin -> /usr/bin symlink, moving existing to /usr/sbin.old" + mv /usr/sbin /usr/sbin.old + ln -sf bin /usr/sbin +fi -- cgit 1.4.1