From ff7e287856a29485b3243ef1a498f6ec35196fbb Mon Sep 17 00:00:00 2001 From: xq2005 Date: Fri, 23 Nov 2012 09:04:44 +0000 Subject: [PATCH] run postscripts when starting on a ubuntu stateless machine git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14415 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/ubuntu/genimage | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index 6aec4eed1..5679e336e 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -1529,13 +1529,17 @@ sub generic_post { #This function is meant to leave the image in a state approxi close($cfgfile); + #ubuntu default run level is 2 chmod(0755,"$rootimg_dir/etc/init.d/gettyset"); - system("cd $rootimg_dir/etc/rc3.d; ln -sf ../init.d/gettyset S60gettyset"); + system("cd $rootimg_dir/etc/rc2.d; ln -sf ../init.d/gettyset S60gettyset"); } copy("$installroot/postscripts/xcatpostinit", "$rootimg_dir/etc/init.d/xcatpostinit"); chmod(0755, "$rootimg_dir/etc/init.d/xcatpostinit"); - system("cd $rootimg_dir/etc/rc3.d; ln -sf ../init.d/xcatpostinit S61xcatpostinit"); + system("cd $rootimg_dir/etc/rc2.d; ln -sf ../init.d/xcatpostinit S61xcatpostinit"); + + #change the /bin/sh link to /bin/bash + system("cd $rootimg_dir/bin/; ln -sf bash sh"); } }