add welcome LED to rc.local

pull/182/head
Yossi 2018-04-27 21:36:19 +03:00
parent dd7d2e101d
commit f9a129148e
2 changed files with 25 additions and 0 deletions

View File

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

View File

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