diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-06-17 19:21:48 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-06-17 20:31:24 +0000 |
commit | ad50ac00a531dbe60260c63760388ce6dac12361 (patch) | |
tree | e45df26ce8c8c6b90ece685231bf86df2acc75f1 /pbuilder-unshare-wrapper | |
parent | 935740912f47d9dc9f0ea337a3a11cc5f0a9e988 (diff) | |
download | pbuilder-ad50ac00a531dbe60260c63760388ce6dac12361.tar pbuilder-ad50ac00a531dbe60260c63760388ce6dac12361.tar.gz |
import 0.125+nmu3
Diffstat (limited to 'pbuilder-unshare-wrapper')
-rwxr-xr-x | pbuilder-unshare-wrapper | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pbuilder-unshare-wrapper b/pbuilder-unshare-wrapper new file mode 100755 index 0000000..ffa25c8 --- /dev/null +++ b/pbuilder-unshare-wrapper @@ -0,0 +1,21 @@ +#!/bin/sh + +die() { + echo >&@ E: $2 returned error code $1 + echo >&2 N: Could not set up the loopback interface. + exit 1 +} + +if test -x /sbin/ifconfig; then + /sbin/ifconfig lo up || die $? ifconfig +elif test -x /sbin/ip; then + /sbin/ip link set lo up || die $? ip +elif test -x /bin/ip; then + /bin/ip link set lo up || die $? ip +else + echo >&2 E: Neither ifconfig nor ip found. + echo >&2 N: Could not set up the loopback interface. + exit 1 +fi + +exec "$@" |