burrow-pi-img/stage2/01-sys-tweaks/00-patches/06-rc_local.diff

16 lines
382 B
Diff

Index: jessie-stage2/rootfs/etc/rc.local
===================================================================
--- jessie-stage2.orig/rootfs/etc/rc.local
+++ jessie-stage2/rootfs/etc/rc.local
@@ -11,4 +11,10 @@
#
# By default this script does nothing.
+# Print the IP address
+_IP=$(hostname -I) || true
+if [ "$_IP" ]; then
+ printf "My IP address is %s\n" "$_IP"
+fi
+
exit 0