]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
xen init script: move init_dom0 into xenstored start
authorHans van Kranenburg <hans@knorrie.org>
Sun, 10 Feb 2019 15:35:20 +0000 (16:35 +0100)
committerIan Jackson <ian.jackson@citrix.com>
Fri, 22 Feb 2019 14:00:16 +0000 (14:00 +0000)
Executing this is only necessary after starting xenstored. In all other
cases it just prints noop spam to stderr.

    -# /usr/lib/xen-4.11/bin/xen-init-dom0 >/dev/null
    Dom0 is already set up

I don't want to silence stderr, so just move the code into the end of
the xenstored start function.

Also, add a hint that the compatibility if/else part should be removed
after the Buster release.

Signed-off-by: Hans van Kranenburg <hans@knorrie.org>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/xen-utils-common.xen.init

index 7fd18e8030866296c730b53733bcfd5c262e5010..e16d263def5a48fec7d845f31986367dd7398367 100644 (file)
@@ -256,14 +256,13 @@ xenstored_start()
        if ! [ $time -lt $timeout ] ; then
            return 2
        fi
-}
 
-init_dom0()
-{
-       log_progress_msg "init-dom0"
+       # Add some extra entries about dom0 into xenstore
        if [ -e $ROOT/bin/xen-init-dom0 ] ; then
            $ROOT/bin/xen-init-dom0 > /dev/null
        else
+           # xen-init-dom0 has been present since Stretch.
+           # Remove this compatibility section in Buster+1
            xenstore-write "/local/domain/0/name" "Domain-0"
            xenstore-write "/local/domain/0/domid" "0"
        fi
@@ -294,11 +293,6 @@ case "$1" in
                0|1) ;;
                *) log_end_msg 1; exit ;;
        esac
-       init_dom0
-       case "$?" in
-               0|1) ;;
-               *) log_end_msg 1; exit ;;
-       esac
        qemu_start
        case "$?" in
                0|1) ;;