From f9a129148e460c05b31ac4b3659f99f1943cb9c1 Mon Sep 17 00:00:00 2001 From: Yossi Date: Fri, 27 Apr 2018 21:36:19 +0300 Subject: [PATCH] add welcome LED to rc.local --- stage2/06-dride-base/00-run.sh | 3 +++ stage2/06-dride-base/files/systemctl/rc.local | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 stage2/06-dride-base/files/systemctl/rc.local diff --git a/stage2/06-dride-base/00-run.sh b/stage2/06-dride-base/00-run.sh index 8f0eb01..888c0f0 100755 --- a/stage2/06-dride-base/00-run.sh +++ b/stage2/06-dride-base/00-run.sh @@ -13,6 +13,9 @@ install -m 644 files/systemctl/record.service ${ROOTFS_DIR}/lib/systemd/system/r install -m 644 files/systemctl/ws.service ${ROOTFS_DIR}/lib/systemd/system/ws.service install -m 644 files/systemctl/live.service ${ROOTFS_DIR}/lib/systemd/system/live.service +# update rc.local with the welome LED +install -m 644 files/rc.local ${ROOTFS_DIR}/etc/rc.local + on_chroot << EOF #------------------------------------------------------- diff --git a/stage2/06-dride-base/files/systemctl/rc.local b/stage2/06-dride-base/files/systemctl/rc.local new file mode 100644 index 0000000..6d5f43d --- /dev/null +++ b/stage2/06-dride-base/files/systemctl/rc.local @@ -0,0 +1,22 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# Print the IP address +/home/core/modules/led/bin/main welcome + +_IP=$(hostname -I) || true +if [ "$_IP" ]; then + printf "My IP address is %s\n" "$_IP" +fi + +exit 0 \ No newline at end of file