Skip to content

Commit

Permalink
Neither /sbin/ip nor /sbin/ifconfig might be installed
Browse files Browse the repository at this point in the history
We still might to have lo network if initrd took take care, like
it does on our current distros
  • Loading branch information
adrianschroeter committed Mar 23, 2022
1 parent 067ee3f commit c6ac358
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions build-vm
Expand Up @@ -1198,13 +1198,13 @@ vm_wrapup_build() {
}

vm_setup_network() {
if test -x /sbin/ip ; then
if test -x /sbin/ip ; then
ip addr add 127.0.0.1/8 dev lo
ip addr add ::1/128 dev lo
ip link set lo up
else
ifconfig lo 127.0.0.1 up
ifconfig lo add ::1/128
elif test -x /sbin/ifconfig ; then
ifconfig lo 127.0.0.1 up
ifconfig lo add ::1/128
fi
. /.build/build.data
if test -n "$VM_NETWORK"; then
Expand Down
8 changes: 4 additions & 4 deletions call-podman
Expand Up @@ -45,13 +45,13 @@ if test -n "$IS_UNSHARED" ; then
mount --make-rprivate /

# create loopback interface
if test -x /sbin/ip ; then
if test -x /sbin/ip ; then
ip addr add 127.0.0.1/8 dev lo
ip addr add ::1/128 dev lo
ip link set lo up
else
ifconfig lo 127.0.0.1 up
ifconfig lo add ::1/128
elif test -x /sbin/ifconfig ; then
ifconfig lo 127.0.0.1 up
ifconfig lo add ::1/128
fi
fi

Expand Down
4 changes: 2 additions & 2 deletions startdockerd
Expand Up @@ -118,11 +118,11 @@ if test -n "$IS_UNSHARED" ; then
mount --make-rprivate /

# create loopback interface
if test -x /sbin/ip ; then
if test -x /sbin/ip ; then
ip addr add 127.0.0.1/8 dev lo
ip addr add ::1/128 dev lo
ip link set lo up
else
elif test -x /sbin/ifconfig ; then
ifconfig lo 127.0.0.1 up
ifconfig lo add ::1/128
fi
Expand Down

0 comments on commit c6ac358

Please sign in to comment.