]> git.proxmox.com Git - pve-container.git/commitdiff
do not allow hotplug of cmode option
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 17 Aug 2015 10:54:12 +0000 (12:54 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 17 Aug 2015 10:54:12 +0000 (12:54 +0200)
Hotplug does not work because we use dtach.

src/PVE/LXC.pm

index 10a89f2862a97c5f628572947f6b24663be5f7a0..472b810871b00f01f6e3de0879905b040bce1da8 100644 (file)
@@ -1089,11 +1089,10 @@ sub update_pct_config {
            } elsif ($opt eq 'swap') {
                delete $conf->{$opt};
                write_cgroup_value("memory", $vmid, "memory.memsw.limit_in_bytes", -1);
-           } elsif ($opt eq 'description' || $opt eq 'onboot' || $opt eq 'startup' ||
-                    $opt eq 'cmode') {
+           } elsif ($opt eq 'description' || $opt eq 'onboot' || $opt eq 'startup') {
                delete $conf->{$opt};
            } elsif ($opt eq 'nameserver' || $opt eq 'searchdomain' ||
-                    $opt eq 'tty' || $opt eq 'console') {
+                    $opt eq 'tty' || $opt eq 'console' || $opt eq 'cmode') {
                delete $conf->{$opt};
                push @nohotplug, $opt;
                next if $running;
@@ -1137,9 +1136,7 @@ sub update_pct_config {
            $conf->{$opt} = $value ? 1 : 0;
        } elsif ($opt eq 'startup') {
            $conf->{$opt} = $value;
-       } elsif ($opt eq 'cmode') {
-           $conf->{$opt} = $value;
-       } elsif ($opt eq 'tty' || $opt eq 'console') {
+       } elsif ($opt eq 'tty' || $opt eq 'console' || $opt eq 'cmode') {
            $conf->{$opt} = $value;
            push @nohotplug, $opt;
            next if $running;