From f2afdb10b2db3fdec7e306eac338919e46da07ef Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Remove redundant/commented code. --- virt-p2v | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) 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"; -- 1.8.3.1