| Server IP : 68.183.124.220 / Your IP : 216.73.217.137 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/lxd/ |
Upload File : |
#!/bin/sh -e
[ ! -e /etc/default/lxd-bridge ] && exit 0
. /etc/default/lxd-bridge
# We only run LXD configuration if in setup mode
[ -e "/var/lib/lxd/.setup_mode" ] || exit 0
# Only apply the configuration if the bridge is defined
if [ "$(lxc profile device get default eth0 nictype --force-local 2>/dev/null)" = "bridged" ]; then
lxc profile unset default user.network_mode --force-local || true
lxc profile unset default environment.http_proxy --force-local || true
if [ "${USE_LXD_BRIDGE}" = "false" ]; then
if [ -n "${LXD_BRIDGE}" ]; then
lxc profile device set default eth0 parent ${LXD_BRIDGE} --force-local || true
fi
else
lxc profile device set default eth0 parent ${LXD_BRIDGE} --force-local || true
if [ -z "${LXD_IPV4_ADDR}" ] && [ -z "${LXD_IPV6_ADDR}" ]; then
lxc profile set default user.network_mode "link-local" --force-local || true
fi
if [ "${LXD_IPV6_PROXY}" = "true" ]; then
lxc profile set default environment.http_proxy "http://[fe80::1%eth0]:13128" --force-local || true
fi
fi
fi
# Get LXD to start containers now
lxd ready
# If we fail, don't get stuck in setup mode
rm -f /var/lib/lxd/.setup_mode
exit 0