]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
linuxDeployment.c: Suppress the telinit error if the first telinit commands
authorOliver Kurth <okurth@vmware.com>
Mon, 17 Jun 2019 18:41:38 +0000 (11:41 -0700)
committerOliver Kurth <okurth@vmware.com>
Mon, 17 Jun 2019 18:41:38 +0000 (11:41 -0700)
commit680c9d4a412a099efde6382a0a4e5f300bc4fc4e
treedfa66633cce1b3eb7c16f337510607a2a3e4c759
parent37d8b16e2cc1a21919cb6974c2a87071a345e232
linuxDeployment.c: Suppress the telinit error if the first telinit commands
                   has made VM reboot.

The code executes '/sbin/telinit 6' repeatedly to reboot VM.  VM will be
rebooting if the telinit command executed successfully(exitcode==0).
Observed the repeated telinit command might get error(exitcode==1) on some
GOSes, ex: Ubuntu18.04, RHEL7.4/7.5 and Fedora 29.
Observed no such error on older GOSes, ex: Ubuntu14.04, RHEL6.6

The error telinit log is confusing, actually it does NOT mean customization
failed.

This change does NOT log telinit error, and returns deployPkg status to
make sure the log is consistent with customization result when the first
'telinit 6' succeeded but one of the following 'telinit 6' command failed.

The following actions are unchanged with or without this change:
1. log telinit error, stop loop and exit 127 if the first 'telinit 6' fails.
2. repeatedly execute 'telinit 6' if previous one executed successfully
   (exitcode==0).
open-vm-tools/libDeployPkg/linuxDeployment.c