2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 11:12:04 +00:00

Make setuppostbootscripts script recognise other settings for runbootscripts attribute

This commit is contained in:
Mark Gurevich 2022-03-21 15:58:50 -04:00
parent 29af00199c
commit 46f9b5056c
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ There are two types of scripts in the postscripts table ( postscripts and postbo
Postscripts will be run after the reboot but before the ``init.d`` process. For Linux diskless deployment, the postscripts will be run at the ``init.d`` time, and xCAT will automatically add the list of postscripts from the postbootscripts attribute to run after postscripts list.
* **postbootscripts attribute** - list of postbootscripts that should be run on this Linux node at the ``init.d`` time after diskful installation reboot or diskless boot
* **xCAT**, by default, for diskful installs only runs the postbootscripts on the install and not on reboot. In xCAT a ``site`` table attribute ``runbootscripts`` is available to change this default behavior. If set to ``yes``, then the postbootscripts will be run on install and on reboot.
* **xCAT**, by default, for diskful installs only runs the postbootscripts on the install and not on reboot. In xCAT a ``site`` table attribute ``runbootscripts`` is available to change this default behavior. If set to ``yes`` or ``y`` or ``1``, then the postbootscripts will be run on install and on reboot. To avoid reinstallation, run ``updatenode <nodes> -P setuppostbootscripts`` command to update the value of ``runbootscripts`` attribute on the compute or service nodes.
.. note:: xCAT automatically adds the postscripts from the xcatdefaults.postscripts attribute of the table to run first on the nodes after install or diskless boot.

View File

@ -29,10 +29,10 @@ if [ ! -d "/opt/xcat" ]; then
mkdir -p /opt/xcat
fi
infofile="/opt/xcat/xcatinfo"
if [ "$RUNBOOTSCRIPTS" = "yes" ] || [ "$RUNBOOTSCRIPTS" = "YES" ]; then
RUNBOOTSCRIPTS=yes
else
if [[ ! "$RUNBOOTSCRIPTS" =~ ^(1|yes|y)$ ]]; then
RUNBOOTSCRIPTS=no
else
RUNBOOTSCRIPTS=yes
fi
# check to see if current setting is already in the file, if so nothing to do
if [ -f $infofile ]; then