Previously with `no_kernel` the `for` loop errored on the modules
wildcard. By checking, if the file exists, this is mitigated.
"mv" asked interactively, if aliased in the user session, so a "--force"
was added.
$squash_dir/usr/lib/dracut/* \
$squash_dir/etc/initrd-release
do
- [[ -d $file ]] && continue
+ [[ -f $file ]] || continue
DRACUT_RESOLVE_DEPS=1 dracutsysrootdir=$squash_dir inst ${file#$squash_dir}
rm $file
done
for folder in "${squash_candidate[@]}"; do
for file in $(find $initdir/$folder/ -not -type d); do
if [[ -e $squash_dir${file#$initdir} ]]; then
- mv $squash_dir${file#$initdir} $file
+ mv -f $squash_dir${file#$initdir} $file
fi
done
done