base-files: set FAILSAFE in /etc/profile when /tmp/.failsafe exists
authorMatthias Schiffer <mschiffer@universe-factory.net>
Fri, 29 Dec 2017 13:34:03 +0000 (14:34 +0100)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Fri, 29 Dec 2017 13:36:26 +0000 (14:36 +0100)
Since dropbear clears the environment, FAILSAFE was not set as intended in
failsafe mode.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
package/base-files/Makefile
package/base-files/files/etc/profile

index 170bc3d4831090e847bc1d8577ae1517fa4abbfd..1cda882bd3fbe4304a4b669cab8ab7f40c4274c1 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/version.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=173.1
+PKG_RELEASE:=173.2
 PKG_FLAGS:=nonshared
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
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!'