X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-p2v;h=d54da3ad84c87ea9437d74c0fe5f3277a99bb87b;hb=c0f46d12532b726bdca5e38b551813acadc55d15;hp=133cee1b9af51101a517f7cbc81946da8257d41b;hpb=7d4f5476b3a7e286e36c6bf6bf06727c56a3f58f;p=virt-p2v.git diff --git a/virt-p2v b/virt-p2v index 133cee1..d54da3a 100755 --- a/virt-p2v +++ b/virt-p2v @@ -450,34 +450,7 @@ let auto_network state = (* Fedora gives an error if this file doesn't exist. *) sh "touch /etc/resolv.conf"; -(* - (* We can run /mnt/root/etc/init.d/network in a chroot environment, - * however this won't work directly because the architecture of the - * binaries under /mnt/root (eg. /mnt/root/sbin/ip) might not match - * the architecture of the live CD kernel. In particular, a 32 bit - * live CD cannot run 64 bit binaries. So we also have to bind-mount - * the live CD's /bin, /sbin, /lib etc. over the equivalents in - * /mnt/root. - *) - let bind dir = - if is_dir dir = Some true then - sh ("mount -o bind " ^ quote dir ^ " " ^ quote ("/mnt/root" ^ dir)) - in - let unbind dir = - if is_dir dir = Some true then sh ("umount -l " ^ quote ("/mnt/root" ^ dir)) - in - let dirs = [ - "/bin"; "/sbin"; "/lib"; "/lib64"; - "/usr/bin"; "/usr/sbin"; "/usr/lib"; "/usr/lib64"; - "/proc"; "/sys" - ] in - List.iter bind dirs; - let status = shwithstatus "chroot /mnt/root /etc/init.d/network start" in - List.iter unbind dirs; -*) - - (* Simpler way to do the above. - * NB. Lazy unmount is required because dhclient keeps its current + (* NB. Lazy unmount is required because dhclient keeps its current * directory open on /etc/sysconfig/network-scripts/ *) sh "mount -o bind /mnt/root/etc /etc";