From ccac86e3d8f97ccec33fd21ddb0093f7f6bf51e1 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 12 Feb 2008 04:00:34 +0000 Subject: [PATCH] Fix syntax error produced by genimage in initrd, require /bin/cpio in CentOS 5 as busybox vintage has broken cpio git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@444 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/share/xcat/netboot/centos/genimage | 6 +++++- xCAT-server-2.0/share/xcat/netboot/fedora/genimage | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/share/xcat/netboot/centos/genimage b/xCAT-server-2.0/share/xcat/netboot/centos/genimage index 3fbd5b9d5..34027bb0f 100755 --- a/xCAT-server-2.0/share/xcat/netboot/centos/genimage +++ b/xCAT-server-2.0/share/xcat/netboot/centos/genimage @@ -181,8 +181,12 @@ sub mkinitrd { print $inifile " mount -t tmpfs rootfs /sysroot\n"; print $inifile " cd /sysroot\n"; print $inifile " echo -n \"Extracting root filesystem:\"\n"; + print $inifile " if [ -x /bin/cpio ]; then\n"; + print $inifile " zcat /rootimg.gz |/bin/cpio -idum\n"; + print $inifile " else\n"; print $inifile " zcat /rootimg.gz |cpio -idum\n"; - print $inifile " echo Done"; + print $inifile " fi\n"; + print $inifile " echo Done\n"; print $inifile "else\n"; print $inifile " echo -n Failed to download image, panicing in 5...\n"; print $inifile " for i in 4 3 2 1 0; do\n"; diff --git a/xCAT-server-2.0/share/xcat/netboot/fedora/genimage b/xCAT-server-2.0/share/xcat/netboot/fedora/genimage index 0c008a582..aad045c31 100755 --- a/xCAT-server-2.0/share/xcat/netboot/fedora/genimage +++ b/xCAT-server-2.0/share/xcat/netboot/fedora/genimage @@ -182,7 +182,7 @@ sub mkinitrd { print $inifile " cd /sysroot\n"; print $inifile " echo -n \"Extracting root filesystem:\"\n"; print $inifile " zcat /rootimg.gz |cpio -idum\n"; - print $inifile " echo Done"; + print $inifile " echo Done\n"; print $inifile "else\n"; print $inifile " echo -n Failed to download image, panicing in 5...\n"; print $inifile " for i in 4 3 2 1 0; do\n";