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>
This commit is contained in:
Matthias Schiffer 2017-12-29 14:34:03 +01:00
parent 2603c85060
commit 1c9299877b
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
2 changed files with 5 additions and 2 deletions

View 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/

View 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!'