stage2: Move ssh host key regen and NOOBS config scripts to raspberrypi-sys-mods

master
Serge Schneider 2017-07-11 16:26:52 +01:00
parent c77669ad9f
commit 207003b5ed
3 changed files with 0 additions and 44 deletions

View File

@ -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

View File

@ -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

View File

@ -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