File: pbuilder-unshare-wrapper

package info (click to toggle)
pbuilder 0.230.4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,948 kB
  • sloc: sh: 5,668; xml: 1,755; makefile: 252; ansic: 11
file content (24 lines) | stat: -rwxr-xr-x 554 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

die() {
	echo >&2 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

# having this variable set could cause programs looking for unreachable machines
unset http_proxy

exec "$@"