From 53bd4767a49ec1fcd1fc2d98febe16e3ed5855ee Mon Sep 17 00:00:00 2001 From: Yossi Date: Tue, 20 Jun 2017 00:01:34 +0300 Subject: [PATCH] fix copy files locally for all startup scripts --- stage2/01-sys-tweaks/01-run.sh | 55 ++++++++++++++++------------------ 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index ca8a5c1..7226a30 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -17,8 +17,31 @@ install -m 644 files/50raspi ${ROOTFS_DIR}/etc/apt/apt.conf.d/ install -m 644 files/console-setup ${ROOTFS_DIR}/etc/default/ -cp files/startup/drideOS-resize ${ROOTFS_DIR}/etc/init.d/drideOS-resize -chmod +x ${ROOTFS_DIR}/etc/init.d/drideOS-resize +#startup script's +# express on startup +cp files/startup/dride-ws ${ROOTFS_DIR}/etc/init.d/dride-ws +chmod +x ${ROOTFS_DIR}/etc/init.d/dride-ws +update-rc.d dride-ws defaults + + +# dride-core on startup +if [ ${OS_TYPE} == "drideOS" ]; then + cp files/startup/dride-core ${ROOTFS_DIR}/etc/init.d/dride-core +else + cp files/startup/dride-core-z ${ROOTFS_DIR}/etc/init.d/dride-core +fi; + +chmod +x ${ROOTFS_DIR}/etc/init.d/dride-core +update-rc.d dride-core defaults + + +if [ ${OS_TYPE} == "drideOS" ]; then + # drideOS-resize on startup + cp files/startup/drideOS-resize ${ROOTFS_DIR}/etc/init.d/drideOS-resize + chmod +x ${ROOTFS_DIR}/etc/init.d/drideOS-resize + update-rc.d drideOS-resize defaults +fi + on_chroot << EOF @@ -203,34 +226,6 @@ sudo update-rc.d isc-dhcp-server enable -#startup script's - -# express on startup -sudo cp files/startup/dride-ws ${ROOTFS_DIR}/etc/init.d/dride-ws -sudo chmod +x ${ROOTFS_DIR}/etc/init.d/dride-ws -sudo update-rc.d dride-ws defaults - - -# dride-core on startup -if [ ${OS_TYPE} == "drideOS" ]; then - sudo cp files/startup/dride-core ${ROOTFS_DIR}/etc/init.d/dride-core -else - sudo cp files/startup/dride-core-z ${ROOTFS_DIR}/etc/init.d/dride-core -fi; - -sudo chmod +x ${ROOTFS_DIR}/etc/init.d/dride-core -sudo update-rc.d dride-core defaults - - -if [ ${OS_TYPE} == "drideOS" ]; then - # drideOS-resize on startup - sudo cp files/startup/drideOS-resize ${ROOTFS_DIR}/etc/init.d/drideOS-resize - sudo chmod +x ${ROOTFS_DIR}/etc/init.d/drideOS-resize - sudo update-rc.d drideOS-resize defaults - -fi - - sudo pip install pyserial