Skip to content

Commit

Permalink
Added core-services/98-sbin-merge scriptlet to create usr/sbin symlink.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Juan RP committed Jun 3, 2015
1 parent 55ecf2f commit 95e7eb7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core-services/98-sbin-merge.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 95e7eb7

Please sign in to comment.