Skip to content

Commit f77de3e

Browse files
Merge pull request #483 from kmathur2/kartik-appcmd-fixes
Fix appPrepConfigRunCmd to report stderr and status
2 parents 7997d3d + 4c860a6 commit f77de3e

File tree

1 file changed

+5
-7
lines changed
  • pkg/controller/kubedirectorcluster

1 file changed

+5
-7
lines changed

pkg/controller/kubedirectorcluster/types.go

+5-7
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,14 @@ const (
8989
rm -rf /opt/guestconfig/appconfig.tgz`
9090
appPrepConfigStatus = "/opt/guestconfig/configure.status"
9191
appPrepConfigRunCmd = `rm -f /opt/guestconfig/configure.* &&
92-
echo -n %s= > ` + appPrepConfigStatus + ` &&
93-
nohup sh -c "` + appPrepStartscript + ` --configure;
94-
echo -n $? >> ` + appPrepConfigStatus + `" > /opt/guestconfig/configure.stdout
95-
2> /opt/guestconfig/configure.stderr &`
92+
echo -n %s= > ` + appPrepConfigStatus + ` &&
93+
nohup sh -c '` + appPrepStartscript + ` --configure 2>/opt/guestconfig/configure.stderr 1>/opt/guestconfig/configure.stdout;
94+
echo -n $? >> ` + appPrepConfigStatus + `' &`
9695
fileInjectionCommand = `mkdir -p %s && cd %s &&
9796
curl -L %s -o %s`
9897
appPrepConfigReconnectCmd = `echo -n %s= > ` + appPrepConfigStatus + ` &&
99-
nohup sh -c "` + appPrepStartscript + ` --reconnect;
100-
echo -n $? >> ` + appPrepConfigStatus + `" >> /opt/guestconfig/configure.stdout
101-
2>> /opt/guestconfig/configure.stderr &`
98+
nohup sh -c '` + appPrepStartscript + ` --reconnect 2>/opt/guestconfig/configure.stderr 1>/opt/guestconfig/configure.stdout;
99+
echo -n $? >> ` + appPrepConfigStatus + `' &`
102100
)
103101

104102
const (

0 commit comments

Comments
 (0)