Browse Source

Update update-lxcs.sh

display hostname of containers that require a reboot
tteckster 1 năm trước cách đây
mục cha
commit
3b4b021c9a
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      misc/update-lxcs.sh

+ 3 - 1
misc/update-lxcs.sh

@@ -93,7 +93,9 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
       update_container $container
     fi
     if pct exec "$container" -- [ -e "/var/run/reboot-required" ]; then
-        containers_needing_reboot+=("$container")
+        # Get the container's hostname and add it to the list
+        container_hostname=$(pct exec "$container" hostname)
+        containers_needing_reboot+=("$container - $container_hostname")
     fi
   fi
 done