mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
tests/virtualbox: Start systemwide DBus in guests.
We want to check whether DBus functionality is working, so let's make sure it is running in our mini-initrd. DBus unfortunately requires to have users properly set up and another configuration file other than in ${dbus.daemon}/etc/dbus-1/system.conf, so we do provide that as well. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
89b6831ffd
commit
7707c7df7f
@ -8,6 +8,19 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
|
||||
#!${pkgs.stdenv.shell} -xe
|
||||
export PATH="${pkgs.coreutils}/bin:${pkgs.utillinux}/bin"
|
||||
|
||||
mkdir -p /etc/dbus-1 /var/run/dbus
|
||||
cat > /etc/passwd <<EOF
|
||||
root:x:0:0::/root:/bin/false
|
||||
messagebus:x:1:1::/var/run/dbus:/bin/false
|
||||
EOF
|
||||
cat > /etc/group <<EOF
|
||||
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.linuxPackages.virtualboxGuestAdditions}/bin/VBoxService
|
||||
${(attrs.vmScript or (const "")) pkgs}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user