Remove some code duplication

ubuntu/yakkety
Steve Langasek 9 years ago
parent 0b279f731b
commit 7339cb09b3

@ -5,11 +5,7 @@ if [ -n "$SUBARCH" ]; then
exit 0 exit 0
fi fi
mount --bind /dev "binary/boot/filesystem.dir/dev" setup_mountpoint binary/boot/filesystem.dir
mount proc-live -t proc "binary/boot/filesystem.dir/proc"
mount sysfs-live -t sysfs "binary/boot/filesystem.dir/sys"
mv "binary/boot/filesystem.dir/etc/resolv.conf" resolv.conf.tmp
cp /etc/resolv.conf "binary/boot/filesystem.dir/etc/resolv.conf"
chroot binary/boot/filesystem.dir dpkg-divert --local --rename /usr/sbin/grub-probe chroot binary/boot/filesystem.dir dpkg-divert --local --rename /usr/sbin/grub-probe
chroot binary/boot/filesystem.dir touch /usr/sbin/grub-probe chroot binary/boot/filesystem.dir touch /usr/sbin/grub-probe
@ -23,7 +19,4 @@ chroot binary/boot/filesystem.dir mkdir /lib/modules
chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe chroot binary/boot/filesystem.dir rm /usr/sbin/grub-probe
chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe chroot binary/boot/filesystem.dir dpkg-divert --remove --local --rename /usr/sbin/grub-probe
mv resolv.conf.tmp "binary/boot/filesystem.dir/etc/resolv.conf" umount_partition binary/boot/filesystem.dir
umount "binary/boot/filesystem.dir/proc"
umount "binary/boot/filesystem.dir/sys"
umount "binary/boot/filesystem.dir/dev"

Loading…
Cancel
Save