Dan Kenigsberg
2009-Oct-27 09:07 UTC
[Ovirt-devel] [PATCH] inhibit error when sourced by a login shell
if $0 is -bash, basename croaks and spits an annoying error. --- scripts/ovirt-functions | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index e89898d..d25e6a2 100755 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -605,7 +605,7 @@ chkconfig_persist() { # execute a function if called as a script, e.g. # ovirt-functions ovirt_store_config /etc/hosts -if [ "$(basename "$0")" = "ovirt-functions" ]; then +if [ "$(basename -- "$0")" = "ovirt-functions" ]; then "$@" fi -- 1.6.2.5