diff options
author | tv <tv@nomic.retiolum> | 2013-11-14 10:40:32 +0100 |
---|---|---|
committer | tv <tv@nomic.retiolum> | 2013-11-14 10:40:32 +0100 |
commit | 168f5927f4a7b69b23f7d90e5a2dd36c6fe78a01 (patch) | |
tree | 8107720e7fcf2e43f68ee8e08fae4e419f9c8a01 /ship | |
parent | b536f99e6f1790df174879cc82045d71db42a099 (diff) |
ship: move all "bailing out" msgs to die
Diffstat (limited to 'ship')
-rw-r--r-- | ship/lib/core | 6 | ||||
-rw-r--r-- | ship/lib/network | 3 | ||||
-rw-r--r-- | ship/lib/punani | 1 | ||||
-rwxr-xr-x | ship/src/remaster_arch_iso | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/ship/lib/core b/ship/lib/core index 5df146a1..7c5cbf46 100644 --- a/ship/lib/core +++ b/ship/lib/core @@ -2,7 +2,11 @@ msg() { echo "$*" >&2; } info() { msg "** $*"; } error() { msg "!! $*"; } -die() { error "$*"; exit 1; } +die() { + error "$*" + error 'Bailing out.' + exit 1 +} exists(){ type "$1" >/dev/null 2>/dev/null; } is_root(){ test $(id -u) -eq 0 diff --git a/ship/lib/network b/ship/lib/network index 74edcbac..e1a9a31e 100644 --- a/ship/lib/network +++ b/ship/lib/network @@ -57,8 +57,7 @@ which_telnet(){ elif exists busybox;then echo `command -v busybox` telnet else - error "Cannot find telnet binary, please install either telnet-client or busybox or netcat or provided TELNET environment.\nbailing out!" - return 1 + die 'Cannot find telnet binary, please install either telnet-client or busybox or netcat or provided TELNET environment.' fi } diff --git a/ship/lib/punani b/ship/lib/punani index c07763a4..84881dbf 100644 --- a/ship/lib/punani +++ b/ship/lib/punani @@ -2,7 +2,6 @@ #@include _punani_db _punani_resolve_package(){ - : ${PACKER?PACKER is not set,bailing out} pkg=${1?please provide package name to resolve} eval printf "%s" \"\${_punanidb_${PACKER}_${pkg}-}\" | grep . } diff --git a/ship/src/remaster_arch_iso b/ship/src/remaster_arch_iso index d089f872..66d5bc05 100755 --- a/ship/src/remaster_arch_iso +++ b/ship/src/remaster_arch_iso @@ -13,7 +13,7 @@ rootdir=$bdir/root outdir=$bdir/out auto_url=euer.krebsco.de/autoinstall info "bdir is at $bdir" -[ ! -e "$isofile" ] && die "$isofile does not exist,bailing out" +[ ! -e "$isofile" ] && die "$isofile does not exist." esudo "$@" @@ -27,7 +27,7 @@ info "mounting isofile ($isofile)" if is_root;then mount -t iso9660 -o loop,ro $isofile $isomnt else - die 'we are not root enough to mount the iso. Bailing Out' + die 'we are not root enough to mount the iso.' fi defer "info 'unmounting $isomnt';umount $isomnt" |