diff options
author | nachoparker <nacho@ownyourbits.com> | 2019-07-02 04:15:46 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-07-06 06:43:54 +0300 |
commit | 35526ab9fcfc538b68a10bbf449d6b1fe5ea7d6d (patch) | |
tree | bf5f7762937f0fd38bb7463041e25726cc74bd16 /build-SD-rpi.sh | |
parent | 88da901eddff125b3e71d9706fbe02edffc659b3 (diff) |
build: use a system wide config file. Remove sury sources
Signed-off-by: nachoparker <nacho@ownyourbits.com>
Diffstat (limited to 'build-SD-rpi.sh')
-rwxr-xr-x | build-SD-rpi.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/build-SD-rpi.sh b/build-SD-rpi.sh index 1f8c5a5b..178913bc 100755 --- a/build-SD-rpi.sh +++ b/build-SD-rpi.sh @@ -43,12 +43,12 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ sudo chroot raspbian_root /bin/bash <<'EOFCHROOT' set -e + # avoid constant annoying spam due to qemu bug - ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload + mv /etc/ld.so.preload / + # mark the image as an image build touch /.ncp-image - # update packages - apt-get update - # As of 10-2018 this upgrades raspi-kernel and messes up wifi and BTRFS #apt-get upgrade -y #apt-get dist-upgrade -y @@ -60,9 +60,11 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ # install everything cd /tmp/ncp-build || exit 1 - source etc/library.sh mkdir -p /usr/local/etc/ncp-config.d cp etc/ncp-config.d/nc-nextcloud.cfg /usr/local/etc/ncp-config.d/ + cp etc/ncp.cfg /usr/local/etc/ + cp etc/library.sh /usr/local/etc/ + source etc/library.sh install_app lamp.sh install_app bin/ncp/CONFIG/nc-nextcloud.sh run_app_unsafe bin/ncp/CONFIG/nc-nextcloud.sh @@ -78,15 +80,17 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ cfg="$(jq '.params[1].value = "pi"' <<<"$cfg")" cfg="$(jq '.params[2].value = "raspberry"' <<<"$cfg")" cfg="$(jq '.params[3].value = "raspberry"' <<<"$cfg")" - echo "$cfg" > etc/ncp-config.d/SSH.cfg + echo "$cfg" > /usr/local/etc/ncp-config.d/SSH.cfg rm -rf /tmp/ncp-build + + mv /ld.so.preload /etc EOFCHROOT clean_chroot_raspbian ## pack - + TAR=output/"$( basename "$IMG" .img ).tar.bz2" pack_image "$IMG" "$TAR" |