fix cp path expanding

This commit is contained in:
James Swineson 2019-04-09 15:58:04 +08:00
parent 2cc01ee124
commit 60c79ca99e

View file

@ -70,7 +70,7 @@ copy_config() {
echo "Copying important config into new rootfs..." echo "Copying important config into new rootfs..."
cp -ax "${OLDROOT}/etc/resolv.conf" "${NEWROOT}/etc" cp -ax "${OLDROOT}/etc/resolv.conf" "${NEWROOT}/etc"
cp -axr "${OLDROOT}/etc/ssh" "${NEWROOT}/etc" cp -axr "${OLDROOT}/etc/ssh" "${NEWROOT}/etc"
cp -ax "${OLDROOT}/etc/{passwd,shadow}" "${NEWROOT}/etc" cp -ax "${OLDROOT}/etc/"{passwd,shadow} "${NEWROOT}/etc"
cp -axr "${OLDROOT}/root/.ssh" "${NEWROOT}/root" cp -axr "${OLDROOT}/root/.ssh" "${NEWROOT}/root"
chroot "${NEWROOT}" chsh -s /bin/bash root chroot "${NEWROOT}" chsh -s /bin/bash root