[OpenWrt-Devel] [PATCH] [base-files] failsafe-mode: print short help on commandline

John Crispin blogic at openwrt.org
Mon Oct 13 14:29:49 EDT 2014


Hi
On 12/10/2014 16:23, Bastian Bittorf wrote:
> [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.
as before, i like the idea however you claim "experienced users need
help" and then you list

/etc/config, passwd and reboot -f

imho something does not fit right

    John

P.S.: i thought i fixed the -f thing. sure it does not work without ?



> this supersedes the old patches:
> http://patchwork.openwrt.org/patch/3337/
> http://patchwork.openwrt.org/patch/3553/
>
> Signed-off-by: Bastian Bittorf <bittorf at bluebottle.com>
> ---
>  package/base-files/files/etc/banner.failsafe |   16 ++++++++++++++++
>  package/base-files/files/etc/profile         |    1 +
>  2 files changed, 17 insertions(+)
>  create mode 100644 package/base-files/files/etc/banner.failsafe
>
> diff --git a/package/base-files/files/etc/banner.failsafe b/package/base-files/files/etc/banner.failsafe
> new file mode 100644
> index 0000000..618a087
> --- /dev/null
> +++ b/package/base-files/files/etc/banner.failsafe
> @@ -0,0 +1,16 @@
> +================= 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
> +
> +restart system with:
> +* reboot -f				 reboots router
> +
> +for more help see:
> +http://wiki.openwrt.org/doc/howto/generic.failsafe
> +=======================================================
> +
> diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile
> index e9a7119..e72c377 100644
> --- a/package/base-files/files/etc/profile
> +++ b/package/base-files/files/etc/profile
> @@ -1,4 +1,5 @@
>  #!/bin/sh
> +[ -e /tmp/.failsafe ] && cat /etc/banner.failsafe
>  [ -f /etc/banner ] && cat /etc/banner
>  
>  export PATH=/usr/bin:/usr/sbin:/bin:/sbin
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list