3
0
Fork 0
forked from mirrors/nixpkgs

nixos/tests/vbox: Fix invocation of dbus

VBoxService needs dbus in order to work properly, which failed to start
up so far, because it was searching in /run/current-system/sw for its
configuration files.

We now no longer run with the --system flag but specify the
configuration file directly instead.

This fixes at least the "simple-gui" test and probably the others as
well, which I haven't tested yet.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2016-05-26 16:45:43 +02:00
parent 3fd3911105
commit 3b8a2a793c
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -11,7 +11,7 @@ let
#!${pkgs.stdenv.shell} -xe
export PATH="${pkgs.coreutils}/bin:${pkgs.utillinux}/bin"
mkdir -p /etc/dbus-1 /var/run/dbus
mkdir -p /var/run/dbus
cat > /etc/passwd <<EOF
root:x:0:0::/root:/bin/false
messagebus:x:1:1::/var/run/dbus:/bin/false
@ -20,9 +20,9 @@ let
root:x:0:
messagebus:x:1:
EOF
cp -v "${pkgs.dbus.daemon}/etc/dbus-1/system.conf" \
/etc/dbus-1/system.conf
"${pkgs.dbus.daemon}/bin/dbus-daemon" --fork --system
"${pkgs.dbus.daemon}/bin/dbus-daemon" --fork \
--config-file="${pkgs.dbus.daemon}/share/dbus-1/system.conf"
${guestAdditions}/bin/VBoxService
${(attrs.vmScript or (const "")) pkgs}