Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-06-27 18:36:03 +0300
committernachoparker <nacho@ownyourbits.com>2018-06-27 18:58:12 +0300
commit8d0faf748fe13692bce26fd4833b707c4f5e0d59 (patch)
tree015d4ed5bce6cfc06aec13d5a262efd4ff85dd62
parent2d70fad41fa40c442e5926cd66150b919a59d225 (diff)
build: prevent services from starting during build
-rw-r--r--buildlib.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/buildlib.sh b/buildlib.sh
index cda68515..7e31b6c3 100644
--- a/buildlib.sh
+++ b/buildlib.sh
@@ -169,12 +169,18 @@ function prepare_chroot_raspbian()
sudo mount -t sysfs sys raspbian_root/sys/
sudo mount -o bind /dev raspbian_root/dev/
sudo mount -o bind /dev/pts raspbian_root/dev/pts
+
sudo cp /usr/bin/qemu-arm-static raspbian_root/usr/bin
+
+ # Prevent services from auto-starting
+ sudo bash -c "echo -e '#!/bin/sh\nexit 101' > raspbian_root/usr/sbin/policy-rc.d"
+ sudo chmod +x raspbian_root/usr/sbin/policy-rc.d
}
function clean_chroot_raspbian()
{
sudo rm -f raspbian_root/usr/bin/qemu-arm-static
+ sudo rm -f raspbian_root/usr/sbin/policy-rc.d
sudo umount -l raspbian_root/{proc,sys,dev/pts,dev}
umount_raspbian
}