base-files: set FAILSAFE in /etc/profile when /tmp/.failsafe exists
[openwrt/staging/dedeckeh.git] / package / base-files / files / etc / profile
index 3eda09b456ba262e9836f3e669c01766c1e65479..8ac9d6dbb5e0d92f040480d738771f50d586d470 100644 (file)
@@ -1,6 +1,9 @@
 #!/bin/sh
+[ -e /tmp/.failsafe ] && export FAILSAFE=1
+
 [ -f /etc/banner ] && cat /etc/banner
-[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
+[ -n "$FAILSAFE" ] || cat /etc/banner.failsafe
+
 fgrep -sq '/ overlay ro,' /proc/mounts && {
        echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
        echo 'Please try to remove files from /overlay/upper/... and reboot!'