mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-14 15:03:53 +00:00

- RHEL/OL 7 doesn't have the ifconfig command by default so have the lxc-net script check for its existence before use, and fall back to using the ip command if ifconfig is not available - When lxc-net is run from systemd on a system with selinux enabled, the mkdir -p ${varrun} will create /run/lxc as init_var_run_t which dnsmasq can't write its pid into, so we restorecon it after creation (to var_run_t) - The lxc-net systemd .service file needs an [Install] section so that "systemctl enable lxc-net" will work Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
14 lines
246 B
SYSTEMD
14 lines
246 B
SYSTEMD
[Unit]
|
|
Description=LXC network bridge setup
|
|
After=network.target
|
|
Before=lxc.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=@LIBEXECDIR@/lxc/lxc-net start
|
|
ExecStop=@LIBEXECDIR@/lxc/lxc-net stop
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|