summaryrefslogtreecommitdiff
path: root/package/base-files/files/etc/profile
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-10-20 06:29:05 +0000
committerJohn Crispin <john@openwrt.org>2014-10-20 06:29:05 +0000
commit829bf6b9a167740a2a113c5af22bce222b7fc5bd (patch)
treeeb8577357fe1c4fe2a7a338a7ac3f892a9ef65f6 /package/base-files/files/etc/profile
parent24d886c4724207d91a02f1c7d7fc934989c657e3 (diff)
downloadmtk-20170518-829bf6b9a167740a2a113c5af22bce222b7fc5bd.zip
mtk-20170518-829bf6b9a167740a2a113c5af22bce222b7fc5bd.tar.gz
mtk-20170518-829bf6b9a167740a2a113c5af22bce222b7fc5bd.tar.bz2
failsafe-mode: print short help on commandline
[base-files] failsafe-mode: print short help on commandline Like mentioned in ticket https://dev.openwrt.org/ticket/11911 this should make the IRC much quieter. Failsafe is somehow special and even experienced users are helpless, because they are not used to this seldom situation. Also: likely you have no internet access in this mode, so you cannot use the wiki. a failsafe-session now looks like this: first we see from 'package/base-files/files/bin/login.sh' the hint: === IMPORTANT ============================ Use 'passwd' to set your login password this will disable telnet and enable SSH ------------------------------------------ after this the /etc/banner ("OpenWrt - wireless freedom") and then the new text: ================= FAILSAFE MODE active ================ special commands: * firstboot reset settings to factory defaults * mount_root mount root-partition with config files after mount_root: * passwd change root's password * /etc/config directory with config files for more help see: http://wiki.openwrt.org/doc/howto/generic.failsafe ======================================================= this supersedes the old patches: http://patchwork.openwrt.org/patch/3337/ http://patchwork.openwrt.org/patch/3553/ Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com> SVN-Revision: 42985
Diffstat (limited to 'package/base-files/files/etc/profile')
-rw-r--r--package/base-files/files/etc/profile1
1 files changed, 1 insertions, 0 deletions
diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile
index e9a7119..3dd58e1 100644
--- a/package/base-files/files/etc/profile
+++ b/package/base-files/files/etc/profile
@@ -1,5 +1,6 @@
#!/bin/sh
[ -f /etc/banner ] && cat /etc/banner
+[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
export PATH=/usr/bin:/usr/sbin:/bin:/sbin
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)