From 5e9f971347e83b616cf7c63a294e238675ba5125 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 21 Sep 2009 15:49:18 +0000 Subject: [PATCH] -Try a different approach to avoid exceeding inittab legal lengths git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4185 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/rh/genimage | 4 ++-- xCAT-server/share/xcat/netboot/sles/genimage | 4 ++-- xCAT-server/share/xcat/netboot/suse/genimage | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 035fd8751..e0c28e14e 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -590,7 +590,7 @@ sub generic_post { #This function is meant to leave the image in a state approxi print $cfgfile "#!/bin/bash\n"; print $cfgfile "for i in `cat /proc/cmdline`; do\n"; print $cfgfile ' KEY=`echo $i|cut -d= -f 1`'."\n"; - print $cfgfile " if [ \"\$KEY\" == \"console\" ]; then\n"; + print $cfgfile " if [ \"\$KEY\" == \"console\" && \"\$i\" != \"console=tty0\" ]; then\n"; print $cfgfile " VALUE=`echo \$i | cut -d= -f 2`\n"; print $cfgfile " COTTY=`echo \$VALUE|cut -d, -f 1`\n"; print $cfgfile " COSPEED=`echo \$VALUE|cut -d, -f 2|cut -dn -f 1`\n"; @@ -600,7 +600,7 @@ sub generic_post { #This function is meant to leave the image in a state approxi print $cfgfile " if [ -x /sbin/initctl ]; then\n"; #Upstart style print $cfgfile " initctl emit --no-wait fedora.serial-console-available \$COTTY \$COSPEED\n"; print $cfgfile " else\n"; - print $cfgfile " echo xco\$COTTY:2345:respawn:/sbin/agetty \$FLOWFLAG \$COTTY \$COSPEED xterm >> /etc/inittab\n"; + print $cfgfile " echo xco:2345:respawn:/sbin/agetty \$FLOWFLAG \$COTTY \$COSPEED xterm >> /etc/inittab\n"; print $cfgfile " init q\n"; print $cfgfile " fi\n"; print $cfgfile " fi\n"; diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index f7210cb21..253142953 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -672,14 +672,14 @@ sub generic_post { #This function is meant to leave the image in a state approxi print $cfgfile "#!/bin/bash\n"; print $cfgfile "for i in `cat /proc/cmdline`; do\n"; print $cfgfile ' KEY=`echo $i|cut -d= -f 1`'."\n"; - print $cfgfile " if [ \"\$KEY\" == \"console\" ]; then\n"; + print $cfgfile " if [ \"\$KEY\" == \"console\" && \"\$i\" != \"console=tty0\" ]; then\n"; print $cfgfile " VALUE=`echo \$i | cut -d= -f 2`\n"; print $cfgfile " COTTY=`echo \$VALUE|cut -d, -f 1`\n"; print $cfgfile " COSPEED=`echo \$VALUE|cut -d, -f 2|cut -dn -f 1`\n"; print $cfgfile " if echo \$VALUE | grep n8r; then\n"; print $cfgfile " FLOWFLAG=\"-h\"\n"; print $cfgfile " fi\n"; - print $cfgfile " echo xco\$COTTY:2345:respawn:/sbin/agetty \$FLOWFLAG \$COTTY \$COSPEED xterm >> /etc/inittab\n"; + print $cfgfile " echo xco:2345:respawn:/sbin/agetty \$FLOWFLAG \$COTTY \$COSPEED xterm >> /etc/inittab\n"; print $cfgfile " init q\n"; print $cfgfile " fi\n"; print $cfgfile "done\n"; diff --git a/xCAT-server/share/xcat/netboot/suse/genimage b/xCAT-server/share/xcat/netboot/suse/genimage index c65c6e435..c7148a300 100755 --- a/xCAT-server/share/xcat/netboot/suse/genimage +++ b/xCAT-server/share/xcat/netboot/suse/genimage @@ -672,14 +672,14 @@ sub generic_post { #This function is meant to leave the image in a state approxi print $cfgfile "#!/bin/bash\n"; print $cfgfile "for i in `cat /proc/cmdline`; do\n"; print $cfgfile ' KEY=`echo $i|cut -d= -f 1`'."\n"; - print $cfgfile " if [ \"\$KEY\" == \"console\" ]; then\n"; + print $cfgfile " if [ \"\$KEY\" == \"console\" && \"\$i\" != \"console=tty0\" ]; then\n"; print $cfgfile " VALUE=`echo \$i | cut -d= -f 2`\n"; print $cfgfile " COTTY=`echo \$VALUE|cut -d, -f 1`\n"; print $cfgfile " COSPEED=`echo \$VALUE|cut -d, -f 2|cut -dn -f 1`\n"; print $cfgfile " if echo \$VALUE | grep n8r; then\n"; print $cfgfile " FLOWFLAG=\"-h\"\n"; print $cfgfile " fi\n"; - print $cfgfile " echo xco\$COTTY:2345:respawn:/sbin/agetty \$FLOWFLAG \$COTTY \$COSPEED xterm >> /etc/inittab\n"; + print $cfgfile " echo xco:2345:respawn:/sbin/agetty \$FLOWFLAG \$COTTY \$COSPEED xterm >> /etc/inittab\n"; print $cfgfile " init q\n"; print $cfgfile " fi\n"; print $cfgfile "done\n";