renamed usrmove to convertfs
parent
dfbb922ddb
commit
2cf328ad0a
|
|
@ -11,7 +11,7 @@ fi
|
|||
|
||||
if [[ "$ROOT" -ef / ]]; then
|
||||
echo "Can't convert the running system."
|
||||
echo "Please boot with 'usrmove' on the kernel command line,"
|
||||
echo "Please boot with 'rd.convertfs' on the kernel command line,"
|
||||
echo "to update with the help of the initramfs,"
|
||||
echo "or run this script from a rescue system."
|
||||
exit 1
|
||||
|
|
@ -153,7 +153,24 @@ set +e
|
|||
|
||||
echo "Run ldconfig."
|
||||
ldconfig -r "$ROOT"
|
||||
#echo "Set autorelabel flag."
|
||||
#> "$ROOT/.autorelabel"
|
||||
|
||||
. $ROOT/etc/selinux/config
|
||||
if [ "$SELINUX" != "disabled" ] && [ -f /etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts ]; then
|
||||
echo "Fixing SELinux labels"
|
||||
/usr/sbin/setfiles -r $ROOT -p /etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts $ROOT/sbin $ROOT/bin $ROOT/lib $ROOT/lib64 $ROOT/usr/lib $ROOT/usr/lib64 $ROOT/etc/ld.so.cache $ROOT/var/cache/ldconfig || :
|
||||
fi
|
||||
|
||||
if [ -d $ROOT/var/run ]; then
|
||||
echo "Converting /var/run to symlink"
|
||||
mv -f $ROOT/var/run $ROOT/var/run.runmove~
|
||||
ln -sfn ../run $ROOT/var/run
|
||||
fi
|
||||
|
||||
if [ -d $ROOT/var/lock ]; then
|
||||
echo "Converting /var/lock to symlink"
|
||||
mv -f $ROOT/var/lock $ROOT/var/lock.lockmove~
|
||||
ln -sfn ../run/lock $ROOT/var/lock
|
||||
fi
|
||||
|
||||
echo "Done."
|
||||
exit 0
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
if getargbool 0 rd.usrmove; then
|
||||
if getargbool 0 rd.convertfs; then
|
||||
if getargbool 0 rd.debug; then
|
||||
bash -x usrmove-convert "$NEWROOT" 2>&1 | vinfo
|
||||
bash -x convertfs "$NEWROOT" 2>&1 | vinfo
|
||||
else
|
||||
usrmove-convert "$NEWROOT" 2>&1 | vinfo
|
||||
convertfs "$NEWROOT" 2>&1 | vinfo
|
||||
fi
|
||||
fi
|
||||
|
|
@ -14,7 +14,7 @@ depends() {
|
|||
install() {
|
||||
dracut_install bash
|
||||
dracut_install find ldconfig mv rm cp ln
|
||||
inst_hook pre-pivot 99 "$moddir/do-usrmove.sh"
|
||||
inst "$moddir/usrmove-convert.sh" /usr/bin/usrmove-convert
|
||||
inst_hook pre-pivot 99 "$moddir/do-convertfs.sh"
|
||||
inst "$moddir/convertfs.sh" /usr/bin/convertfs
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue