diff --git a/steps/improve/merged_usr.sh b/steps/improve/merged_usr.sh index 14e79d87..33d30748 100755 --- a/steps/improve/merged_usr.sh +++ b/steps/improve/merged_usr.sh @@ -6,5 +6,9 @@ # Add the rest of the FHS that we will use and is not created pre-boot ln -s bin /usr/sbin for d in bin lib sbin; do + if [ -d "/${d}" ] && ! [ -L "/${d}" ]; then + # Move the non symlink directory out of the way + mv "/${d}" "/${d}-saved" + fi ln -s "usr/${d}" "/${d}" || true # these might exist if rerunning done