diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2017-12-29 14:34:03 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2017-12-29 14:36:26 +0100 |
commit | 1c9299877be9f4b0aa91d9861d04f78b01d66a9d (patch) | |
tree | 3a6bfe4481b1d293c16120481598a0ee7940ef20 /package/base-files/files | |
parent | 2603c850602ab1d8837905b23a079dd6ab2cdf99 (diff) | |
download | upstream-1c9299877be9f4b0aa91d9861d04f78b01d66a9d.tar.gz upstream-1c9299877be9f4b0aa91d9861d04f78b01d66a9d.tar.bz2 upstream-1c9299877be9f4b0aa91d9861d04f78b01d66a9d.zip |
base-files: set FAILSAFE in /etc/profile when /tmp/.failsafe exists
Since dropbear clears the environment, FAILSAFE was not set as intended in
failsafe mode.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'package/base-files/files')
-rw-r--r-- | package/base-files/files/etc/profile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index 3eda09b456..8ac9d6dbb5 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -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!' |