Lines 38-48
univention-config-registry set uvmm/kvm/bridge/autostart?no \
|
Link Here
|
---|
|
38 |
uvmm/libvirt/action/shutdown?suspend |
38 |
uvmm/libvirt/action/shutdown?suspend |
39 |
|
39 |
|
40 |
# Bug #33006: incompatible with bridge configuration through UMC |
40 |
# Bug #33006: incompatible with bridge configuration through UMC |
41 |
case "$(univention-config-registry get uvmm/kvm/bridge/autostart)" in |
41 |
setup_bridge () { |
42 |
false|no) ;; |
42 |
local BRIDGE='br0' |
43 |
manually) ;; |
43 |
# Only after succeddful installation |
44 |
*) univention-config-registry set umc/modules/setup/network/disabled/by=kvm ;; |
44 |
[ "$1" = configure ] || return 0 |
45 |
esac |
45 |
# Not when old script is used |
|
|
46 |
case "$(univention-config-registry get uvmm/kvm/bridge/autostart)" in |
47 |
false|no) ;; |
48 |
manually) ;; |
49 |
*) univention-config-registry set umc/modules/setup/network/disabled/by=kvm ; return 0 ;; |
50 |
esac |
51 |
# Only once after upgrade from UCS-3 or for new installation |
52 |
dpkg --compare-versions "$2" lt 3.0.3 || return 0 |
53 |
# Not when br0 is already configured |
54 |
[ -n "$(ucr --keys-only search --brief --non-empty "^interfaces/${BRIDGE}/")" ] && return 0 |
55 |
# Not when any other bridge is configured |
56 |
ucr search --brief --non-empty '^interfaces/[^/]+/options/[0-9]+$' | |
57 |
grep -q '^interfaces/[^/]+/options/[0-9]+: bridge_ports ' && return 0 |
58 |
|
59 |
xargs -d '\n' ucr set <<__UCR__ |
60 |
interfaces/${BRIDGE}/type=manual |
61 |
interfaces/${BRIDGE}/start=yes |
62 |
interfaces/${BRIDGE}/options/0=bridge_fd 0 |
63 |
interfaces/${BRIDGE}/options/1=bridge_ports none |
64 |
__UCR__ |
65 |
ifup "$BRIDGE" |
66 |
} |
67 |
setup_bridge "$@" |
46 |
|
68 |
|
47 |
if [ "$server_role" = "domaincontroller_master" -o "$server_role" = "domaincontroller_backup" ] |
69 |
if [ "$server_role" = "domaincontroller_master" -o "$server_role" = "domaincontroller_backup" ] |
48 |
then |
70 |
then |
49 |
- |
|
|