Simplify glean.sh options

Allow glean.sh to directly pass arguments into glean. This will allow
operators to write systemd service config files overriding
ExecStartPre setting.

Change-Id: I0cfd83ab4208e3a35d7674c5fc34cd209d340074
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-08-12 14:59:26 -04:00
parent 0b3e21f3bc
commit 549ae8b869
2 changed files with 2 additions and 7 deletions

View File

@ -18,7 +18,6 @@ set -eu
set -o pipefail
PATH=/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin
INTERFACE=${1:-} #optional, if not specified configure all available interfaces
function config_exists() {
local interface=$1
@ -63,8 +62,4 @@ if [ -n "$CONFIG_DRIVE_LABEL" ]; then
glean --ssh --skip-network --hostname
fi
if [ -n "$INTERFACE" ]; then
glean --interface "${INTERFACE}"
else
glean
fi
glean $@

View File

@ -8,7 +8,7 @@ ConditionPathExists=!/etc/sysconfig/network-scripts/ifcfg-%I
[Service]
Type=oneshot
User=root
ExecStartPre=%%GLEANSH_PATH%%/glean.sh %I
ExecStartPre=%%GLEANSH_PATH%%/glean.sh --interface %I
ExecStart=/sbin/ifup %I
RemainAfterExit=true