[node-patches] Change in ovirt-node[master]: Add a on-boot hook to run scripts on boot

dougsland at redhat.com dougsland at redhat.com
Thu Jun 19 23:05:57 UTC 2014


Douglas Schilling Landgraf has posted comments on this change.

Change subject: Add a on-boot hook to run scripts on boot
......................................................................


Patch Set 2: Code-Review+1

(2 comments)

The code for trigger the hooks is working, suggestion only for the log.

http://gerrit.ovirt.org/#/c/28953/2/scripts/ovirt-init-functions.sh.in
File scripts/ovirt-init-functions.sh.in:

Line 1009:     if [[ -d "$HOOK_ON_BOOT_DIR" ]];
Line 1010:     then
Line 1011:         for script in "$HOOK_ON_BOOT_DIR"/*;
Line 1012:         do
Line 1013:             echo "Running handler: $script"
Fabian, what about this code capture the output of all hooks and save it into /var/log/ovirt-hooks-boot.log instead of every hook save itself output?
Line 1014:             "$script"
Line 1015:         done
Line 1016:     fi
Line 1017: 


Line 1010:     then
Line 1011:         for script in "$HOOK_ON_BOOT_DIR"/*;
Line 1012:         do
Line 1013:             echo "Running handler: $script"
Line 1014:             "$script"
A possible suggestion:

date >> /var/log/ovirt-hooks-boot.log
"$script" >> /var/log/ovirt-hooks-boot.log
date >> /var/log/ovirt-hooks-boot.log

Or even put the logs in the sequence of /var/log/ovirt.log as I see the above echo appeared in the log.
Line 1015:         done
Line 1016:     fi
Line 1017: 
Line 1018:     return 0


-- 
To view, visit http://gerrit.ovirt.org/28953
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I306c1f12da7ec3e2454a8504cd3c462364a291f3
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Joey Boggs <jboggs at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes



More information about the node-patches mailing list