summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Conrad <adconrad@ubuntu.com>2018-02-08 16:21:43 -0500
committerJeremy Bicha <jbicha@ubuntu.com>2018-02-09 07:45:10 -0500
commit537c7bc10526e6d844ffb45c2ccf5b88355401d1 (patch)
treed6a832606a98d0e9e6fd73347292f3daa6a31574
parent463a67af4d78d73fcd780eaf85073175d444a2fa (diff)
downloadgvfs-537c7bc10526e6d844ffb45c2ccf5b88355401d1.tar.gz
test: Make /etc/init/ optional
https://bugzilla.gnome.org/show_bug.cgi?id=793316
-rwxr-xr-xtest/gvfs-testbed5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/gvfs-testbed b/test/gvfs-testbed
index 9c1bac9a..5e36783a 100755
--- a/test/gvfs-testbed
+++ b/test/gvfs-testbed
@@ -72,10 +72,13 @@ mount -n -t tmpfs tmpfs $MNT
# prepare overlay directories and copy essential configuration
mkdir -p $MNT/etc/samba $MNT/var/lib/samba/private $MNT/var/cache/samba $MNT/var/log/samba $MNT/home/$CALLING_USER/run $MNT/run_samba $MNT/media
touch $MNT/etc/fstab $MNT/home/gvfs_sandbox_marker
-cp -a /etc/passwd /etc/shadow /etc/group /etc/hosts /etc/pam* /etc/nsswitch.conf /etc/security/ /etc/init /etc/init.d /etc/systemd /etc/login.defs /etc/dbus-1 /etc/polkit-1 $MNT/etc/
+cp -a /etc/passwd /etc/shadow /etc/group /etc/hosts /etc/pam* /etc/nsswitch.conf /etc/security/ /etc/init.d /etc/systemd /etc/login.defs /etc/dbus-1 /etc/polkit-1 $MNT/etc/
if [ -d /etc/selinux ]; then
cp -a /etc/selinux $MNT/etc/
fi
+if [ -d /etc/init ]; then
+ cp -a /etc/init $MNT/etc/
+fi
chown -R $CALLING_USER:$CALLING_GROUP $MNT/home/$CALLING_USER
# ensure we can resolve our hostname
echo "127.0.0.1 `uname -n`" >> $MNT/etc/hosts