From 207003b5edfa33795a9886a5cb434b5079c9817b Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Tue, 11 Jul 2017 16:26:52 +0100 Subject: [PATCH] stage2: Move ssh host key regen and NOOBS config scripts to raspberrypi-sys-mods --- stage2/01-sys-tweaks/01-run.sh | 2 -- .../01-sys-tweaks/files/apply_noobs_os_config | 31 ------------------- .../files/regenerate_ssh_host_keys.service | 11 ------- 3 files changed, 44 deletions(-) delete mode 100644 stage2/01-sys-tweaks/files/apply_noobs_os_config delete mode 100644 stage2/01-sys-tweaks/files/regenerate_ssh_host_keys.service diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index e92ceff..f24d529 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -1,7 +1,5 @@ #!/bin/bash -e -install -m 644 files/regenerate_ssh_host_keys.service ${ROOTFS_DIR}/lib/systemd/system/ -install -m 755 files/apply_noobs_os_config ${ROOTFS_DIR}/etc/init.d/ install -m 755 files/resize2fs_once ${ROOTFS_DIR}/etc/init.d/ install -d ${ROOTFS_DIR}/etc/systemd/system/rc-local.service.d diff --git a/stage2/01-sys-tweaks/files/apply_noobs_os_config b/stage2/01-sys-tweaks/files/apply_noobs_os_config deleted file mode 100644 index c9afe7d..0000000 --- a/stage2/01-sys-tweaks/files/apply_noobs_os_config +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: apply_noobs_os_config -# Required-Start: -# Required-Stop: -# Default-Start: 2 -# Default-Stop: -# Short-Description: Apply config from /boot/os_config.json -# Description: -### END INIT INFO - -. /lib/lsb/init-functions - -set -e - -case "$1" in - start) - log_daemon_msg "Applying config from /boot/os_config.json (if it exists)" - if raspi-config --apply-os-config; then - update-rc.d apply_noobs_os_config remove - rm /etc/init.d/apply_noobs_os_config - log_end_msg 0 - else - log_end_msg 1 - fi - ;; - *) - echo "Usage: $0 start" >&2 - exit 3 - ;; -esac diff --git a/stage2/01-sys-tweaks/files/regenerate_ssh_host_keys.service b/stage2/01-sys-tweaks/files/regenerate_ssh_host_keys.service deleted file mode 100644 index a2d1571..0000000 --- a/stage2/01-sys-tweaks/files/regenerate_ssh_host_keys.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Regenerate SSH host keys - -[Service] -Type=oneshot -ExecStartPre=/bin/sh -c "if [ -e /dev/hwrng ]; then dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096; fi" -ExecStart=/usr/bin/ssh-keygen -A -ExecStartPost=/bin/rm /lib/systemd/system/regenerate_ssh_host_keys.service ; /usr/sbin/update-rc.d regenerate_ssh_host_keys remove - -[Install] -WantedBy=multi-user.target