summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-11-21 19:43:45 +0000
committerdteske <dteske@FreeBSD.org>2013-11-21 19:43:45 +0000
commita3300300c5ffe60632e7edb17ed68a0501b6c9b2 (patch)
tree5f4a1cef4a35784fa98a319a0150e5f2180fcd2a /usr.sbin
parentf360fec59cc4c33b765f0fcb88b6be28fa0df079 (diff)
downloadFreeBSD-src-a3300300c5ffe60632e7edb17ed68a0501b6c9b2.zip
FreeBSD-src-a3300300c5ffe60632e7edb17ed68a0501b6c9b2.tar.gz
f_die() (see `bsdconfig includes -dF die') uses a dialog box (and has been
documented as such; I just forgot). These utilities are command-line only and as such should stick to either using f_die without arguments or printf)
Diffstat (limited to 'usr.sbin')
-rwxr-xr-xusr.sbin/bsdconfig/dot/dot2
-rwxr-xr-xusr.sbin/bsdconfig/includes/includes8
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/bsdconfig/dot/dot b/usr.sbin/bsdconfig/dot/dot
index e13a269..c2ef319 100755
--- a/usr.sbin/bsdconfig/dot/dot
+++ b/usr.sbin/bsdconfig/dot/dot
@@ -163,7 +163,7 @@ while getopts cdhi flag; do
done
shift $(( $OPTIND - 1 ))
-cd $BSDCFG_LIBE || f_die 1 "$msg_directory_not_found" "$BSDCFG_LIB"
+cd $BSDCFG_LIBE || f_die # Pedantic
#
# Get a list of menu programs
diff --git a/usr.sbin/bsdconfig/includes/includes b/usr.sbin/bsdconfig/includes/includes
index 338a4f5..28802a0 100755
--- a/usr.sbin/bsdconfig/includes/includes
+++ b/usr.sbin/bsdconfig/includes/includes
@@ -137,7 +137,7 @@ done
shift $(( $OPTIND - 1 ))
# cd(1) to `share' dir so relative paths work for find and positional args
-cd $BSDCFG_SHARE || f_die 1 "$msg_directory_not_found" "$BSDCFG_SHARE"
+cd $BSDCFG_SHARE || f_die # Pedantic
#
# If given an argument, operate on it specifically (implied `-f') and exit
@@ -147,9 +147,11 @@ for include in "$@"; do
# See if they've just omitted the `*.subr' suffix
[ -f "$include.subr" -a ! -f "$include" ] && include="$include.subr"
if [ ! -f "$include" ]; then
- f_die 1 "$msg_no_such_file_or_directory" "$0" "$include"
+ printf "$msg_no_such_file_or_directory" "$0" "$include"
+ exit $FAILURE
elif [ ! -r "$include" ]; then
- f_die 1 "$msg_permission_denied" "$0" "$include"
+ printf "$msg_permission_denied" "$0" "$include"
+ exit $FAILURE
fi
show_include "$include" || f_die
done
OpenPOWER on IntegriCloud