diff --git a/debootstrap-ng.sh b/debootstrap-ng.sh index b4e12f6ba9..ebcd2e0ee6 100644 --- a/debootstrap-ng.sh +++ b/debootstrap-ng.sh @@ -475,7 +475,10 @@ create_image() mkdir -p $CACHEDIR/$DESTIMG cp $CACHEDIR/$SDCARD/etc/armbian.txt $CACHEDIR/$DESTIMG mv $CACHEDIR/${SDCARD}.raw $CACHEDIR/$DESTIMG/${version}.img - [[ $BUILD_ALL != yes ]] && cp $CACHEDIR/$DESTIMG/${version}.img $DEST/images/${version}.img + if [[ $BUILD_ALL != yes ]]; then + mv $CACHEDIR/$DESTIMG/${version}.img $DEST/images/${version}.img + rm -rf $CACHEDIR/$DESTIMG + fi display_alert "Done building" "$DEST/images/${version}.img" "info" } ############################################################################# diff --git a/distributions.sh b/distributions.sh index 7013ac0a91..21334158b2 100644 --- a/distributions.sh +++ b/distributions.sh @@ -143,7 +143,7 @@ install_common() install -m 644 $SRC/lib/scripts/firstrun.service $CACHEDIR/$SDCARD/etc/systemd/system/ # enable firstrun script - chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload enable firstrun.service 2>/dev/null" + chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload enable firstrun.service >/dev/null 2>&1" # enable verbose kernel messages on first boot touch $CACHEDIR/$SDCARD/boot/.verbose @@ -160,7 +160,7 @@ install_common() cp $SRC/lib/scripts/log2ram/log2ram.service $CACHEDIR/$SDCARD/etc/systemd/system/log2ram.service install -m 755 $SRC/lib/scripts/log2ram/log2ram $CACHEDIR/$SDCARD/usr/local/sbin/ install -m 755 $SRC/lib/scripts/log2ram/log2ram.hourly $CACHEDIR/$SDCARD/etc/cron.hourly/log2ram - chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload enable log2ram.service 2>/dev/null" + chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload enable log2ram.service >/dev/null 2>&1" cat <<-EOF > $CACHEDIR/$SDCARD/etc/default/log2ram # configuration values for the log2ram service ENABLED=true @@ -169,7 +169,7 @@ install_common() EOF # enable getty on serial console - chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload enable serial-getty@$SERIALCON.service 2>/dev/null" + chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload enable serial-getty@$SERIALCON.service >/dev/null 2>&1" # don't clear screen tty1 mkdir -p "$CACHEDIR/$SDCARD/etc/systemd/system/getty@tty1.service.d/" @@ -191,9 +191,7 @@ install_common() install_distribution_specific() { display_alert "Applying distribution specific tweaks for" "$RELEASE" "info" - case $RELEASE in - jessie) # enable root login for latest ssh on jessie sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' $CACHEDIR/$SDCARD/etc/ssh/sshd_config @@ -225,9 +223,7 @@ install_distribution_specific() # disable not working on unneeded services # ureadahead needs kernel tracing options that AFAIK are present only in mainline - chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload mask ureadahead.service >/dev/null 2>&1" - chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload mask setserial.service etc-setserial.service >/dev/null 2>&1" - chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload mask ondemand.service >/dev/null 2>&1" + chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload mask ondemand.service ureadahead.service setserial.service etc-setserial.service >/dev/null 2>&1" # properly disable powersaving wireless mode for NetworkManager mkdir -p $CACHEDIR/$SDCARD/etc/NetworkManager/conf.d/ diff --git a/scripts/firstrun.service b/scripts/firstrun.service index d9e8a0467f..39a44b861a 100644 --- a/scripts/firstrun.service +++ b/scripts/firstrun.service @@ -1,7 +1,8 @@ [Unit] Description=Armbian first run tasks After=local-fs.target network.target -Before=getty.target +Before=getty.target system-getty.slice +DefaultDependencies=no [Service] Type=oneshot diff --git a/scripts/log2ram/log2ram.service b/scripts/log2ram/log2ram.service index 3e1e3efd50..1eaeb2d9a9 100644 --- a/scripts/log2ram/log2ram.service +++ b/scripts/log2ram/log2ram.service @@ -1,5 +1,5 @@ [Unit] -Description=Log2Ram +Description=Armbian enhanced Log2Ram DefaultDependencies=no Wants=rsyslog.service systemd-journald.service Before=syslog.target sysinit.target