From 2957dc90cba2f6ef9ed2df65e542b0b7bcfd00c4 Mon Sep 17 00:00:00 2001 From: baiyuan Date: Mon, 7 Jul 2014 09:33:14 -0400 Subject: [PATCH] enhance code for both root and non-root user --- xCAT-SoftLayer/bin/pushinitrd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-SoftLayer/bin/pushinitrd b/xCAT-SoftLayer/bin/pushinitrd index 02ea1b9d4..e3927f10c 100755 --- a/xCAT-SoftLayer/bin/pushinitrd +++ b/xCAT-SoftLayer/bin/pushinitrd @@ -133,7 +133,8 @@ sub updateGrubOnNodes { my @output = runcmd('which modifygrub'); my $modifygrub = $output[0]; chomp($modifygrub); - my $cmd = "xdsh $nr --sudo -e $modifygrub $vtxt $dtxt -w $WAITTIME -p " . $bootparms->{osimageprovmethod} . ' ' . remoteFilename($bootparms->{kernel}) . ' ' . remoteFilename($bootparms->{initrd}) . ' '; + my $euser ="root"; + my $cmd = "xdsh $nr -l $euser -e $modifygrub $vtxt $dtxt -w $WAITTIME -p " . $bootparms->{osimageprovmethod} . ' ' . remoteFilename($bootparms->{kernel}) . ' ' . remoteFilename($bootparms->{initrd}) . ' '; # we need to quote the kernel parms, both here when passing it to xdsh, and on the node # when xdsh is passing it to modifygrub. The way to get single quotes inside single quotes # is to quote each of the outer single quotes with double quotes.