[OpenWrt-Devel] [PATCH] [base-files] 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. this supersedes the old patches: http://patchwork.openwrt.org/patch/3337/ http://patchwork.openwrt.org/patch/3553/ Signed-off-by: Bastian Bittorf --- 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 000..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_rootmount root-partition with config files + +after mount_root: +* passwdchange 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 -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed)
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 in such a seldom situation. Also: likely you have no internet access in this mode, so you cannot use the wiki. Signed-off-by: Bastian Bittorf --- package/base-files/files/etc/banner.failsafe | 11 +++ package/base-files/files/etc/profile |1 + 2 files changed, 12 insertions(+), 0 deletions(-) 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 000..444cc6c --- /dev/null +++ b/package/base-files/files/etc/banner.failsafe @@ -0,0 +1,11 @@ +== FAILSAFE MODE + * mount_root mounts partition with config files + * /etc/configdirectory with config files + * firstboot reset settings to factory defaults + * passwd reset root's password + * reboot -f reboots router + + please also respect: + 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 171adc1..41b8e80 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -1,4 +1,5 @@ #!/bin/sh +[ -f /tmp/.failsafe -a -f /etc/banner.failsafe ] && cat /etc/banner.failsafe [ -f /etc/banner ] && cat /etc/banner export PATH=/bin:/sbin:/usr/bin:/usr/sbin -- 1.7.2.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] failsafe-mode: print short help on commandline
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 > --- > 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 000..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/configdirectory 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@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] failsafe-mode: print short help on commandline
* John Crispin [13.10.2014 21:18]: > as before, i like the idea however you claim "experienced users need > help" and then you list > > /etc/config, passwd and reboot -f "also experienced users" - this includes the mortal ones. even the "best" are not used to e.g. 'mount_root' and 'firstboot' > P.S.: i thought i fixed the -f thing. sure it does not work without ? i will check. are there other suggestions, which commands should be listed? i should do a grep "failsafe" $openwrt_irc_archive bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] failsafe-mode: print short help on commandline
* John Crispin [13.10.2014 21:18]: > P.S.: i thought i fixed the -f thing. sure it does not work without ? you are right - it works, i remove the 'reboot -f' hint and send a [patch v2] for reference, a running failsafe-session with r42884 looks like: root@(none):/# ps PID USER VSZ STAT COMMAND 1 root 1200 S/sbin/init 2 root 0 SW [kthreadd] 3 root 0 SW [ksoftirqd/0] 4 root 0 SW [kworker/0:0] 5 root 0 SW< [kworker/0:0H] 6 root 0 SW [kworker/u2:0] 7 root 0 SW< [khelper] 8 root 0 SW [kworker/u2:1] 58 root 0 SW< [writeback] 61 root 0 SW< [bioset] 63 root 0 SW< [kblockd] 88 root 0 SW [kworker/0:1] 93 root 0 SW [kswapd0] 138 root 0 SW [fsnotify_mark] 153 root 0 SW< [ath79-spi] 234 root 0 SW< [deferwq] 244 root 0 SW [khubd] 254 root 1228 S/sbin/procd -h /etc/hotplug-preinit.json 255 root 1520 S/bin/sh /etc/preinit 256 root 0 SW [kworker/0:2] 322 root 1360 Stelnetd -l /bin/login.sh 324 root 1352 Slock /tmp/.failsafe 325 root 1364 Sash --login 333 root 1364 S/bin/ash --login 343 root 1360 Rps bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed)]
* John Crispin [12.04.2013 22:19]: > let me fix up the wording a bit and push a slightly different version > of the patch ;) anything i can help with this patch? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed)
Hi, On 17 February 2013 13:11, Bastian Bittorf wrote: > 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 in such a > seldom situation. Also: likely you have no internet access > in this mode, so you cannot use the wiki. I like the idea. There's nothing wrong with being more user friendly :-) > Signed-off-by: Bastian Bittorf > > --- > package/base-files/files/etc/banner.failsafe | 11 +++ > package/base-files/files/etc/profile |1 + > 2 files changed, 12 insertions(+), 0 deletions(-) > 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 000..444cc6c > --- /dev/null > +++ b/package/base-files/files/etc/banner.failsafe > @@ -0,0 +1,11 @@ > +== FAILSAFE MODE > + * mount_root mounts partition with config files > + * /etc/configdirectory with config files > + * firstboot reset settings to factory defaults > + * passwd reset root's password > + * reboot -f reboots router The order looks a bit random. I'd put firstboot to top, then mount_root (maybe separated with an extra line with "or"), then below that passwd and /etc/config with mentioning that these are only available after running mount_root. reboot -f can stay last, as it's usually the last thing you do ;-). Maybe also a short intro line, like "Some useful commands:". > + > + please also respect: > + 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 171adc1..41b8e80 100644 > --- a/package/base-files/files/etc/profile > +++ b/package/base-files/files/etc/profile > @@ -1,4 +1,5 @@ > #!/bin/sh > +[ -f /tmp/.failsafe -a -f /etc/banner.failsafe ] && cat /etc/banner.failsafe > [ -f /etc/banner ] && cat /etc/banner > > export PATH=/bin:/sbin:/usr/bin:/usr/sbin > -- > 1.7.2.5 > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed)
* Jonas Gorski [19.02.2013 17:00]: > > The order looks a bit random. I'd put firstboot to top, then > mount_root (maybe separated with an extra line with "or"), then below > that passwd and /etc/config with mentioning that these are only > available after running mount_root. reboot -f can stay last, as it's > usually the last thing you do ;-). > Maybe also a short intro line, like "Some useful commands:". thanks for feedback - amended patch attached bye, bastian >From 142568572a48698eb6d07affbb4cc5d6f73b00da Mon Sep 17 00:00:00 2001 From: Bastian Bittorf Date: Sun, 17 Feb 2013 12:08:53 +0100 Subject: [PATCH] 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 helpless in such a seldom situation. Also: likely you have no internet access in this mode, so you cannot use the wiki. Signed-off-by: Bastian Bittorf --- package/base-files/files/etc/banner.failsafe | 14 ++ package/base-files/files/etc/profile |1 + 2 files changed, 15 insertions(+), 0 deletions(-) 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 000..7804ded --- /dev/null +++ b/package/base-files/files/etc/banner.failsafe @@ -0,0 +1,14 @@ +=== FAILSAFE MODE active + some useful commands: + * firstboot reset settings to factory defaults + * mount_root mounts partition with config files + after mount_root: + * passwd reset root's password + * /etc/config directory with config files + leave system with: + * reboot -f reboots router + + please also respect: + 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 171adc1..41b8e80 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -1,4 +1,5 @@ #!/bin/sh +[ -f /tmp/.failsafe -a -f /etc/banner.failsafe ] && cat /etc/banner.failsafe [ -f /etc/banner ] && cat /etc/banner export PATH=/bin:/sbin:/usr/bin:/usr/sbin -- 1.7.2.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed)
* Bastian Bittorf [19.02.2013 17:44]: > thanks for feedback - amended patch attached bump. any problems regarding the patch? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed)]
Bump. please apply or describe open problems. - Forwarded message from Bastian Bittorf - Date: Tue, 19 Feb 2013 17:44:00 +0100 From: Bastian Bittorf To: OpenWrt Development List Subject: Re: [OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed) * Jonas Gorski [19.02.2013 17:00]: > > The order looks a bit random. I'd put firstboot to top, then > mount_root (maybe separated with an extra line with "or"), then below > that passwd and /etc/config with mentioning that these are only > available after running mount_root. reboot -f can stay last, as it's > usually the last thing you do ;-). > Maybe also a short intro line, like "Some useful commands:". thanks for feedback - amended patch attached bye, bastian >From 142568572a48698eb6d07affbb4cc5d6f73b00da Mon Sep 17 00:00:00 2001 From: Bastian Bittorf Date: Sun, 17 Feb 2013 12:08:53 +0100 Subject: [PATCH] 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 helpless in such a seldom situation. Also: likely you have no internet access in this mode, so you cannot use the wiki. Signed-off-by: Bastian Bittorf --- package/base-files/files/etc/banner.failsafe | 14 ++ package/base-files/files/etc/profile |1 + 2 files changed, 15 insertions(+), 0 deletions(-) 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 000..7804ded --- /dev/null +++ b/package/base-files/files/etc/banner.failsafe @@ -0,0 +1,14 @@ +=== FAILSAFE MODE active + some useful commands: + * firstboot reset settings to factory defaults + * mount_root mounts partition with config files + after mount_root: + * passwd reset root's password + * /etc/config directory with config files + leave system with: + * reboot -f reboots router + + please also respect: + 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 171adc1..41b8e80 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -1,4 +1,5 @@ #!/bin/sh +[ -f /tmp/.failsafe -a -f /etc/banner.failsafe ] && cat /etc/banner.failsafe [ -f /etc/banner ] && cat /etc/banner export PATH=/bin:/sbin:/usr/bin:/usr/sbin -- 1.7.2.5 - End forwarded message - ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed)]
Hi, some comments inline --- /dev/null +++ b/package/base-files/files/etc/banner.failsafe @@ -0,0 +1,14 @@ +=== FAILSAFE MODE active + some useful commands: nitpick: what makes them more useful than other commands ? useful seems to be a superfluous adjective + * firstboot reset settings to factory defaults + * mount_root mounts partition with config files the FS is called "root" not "the one with config files" + after mount_root: + * passwd reset root's password + * /etc/config directory with config files + leave system with: maybe "reboot the system" ? ... we are rebooting it and not leaving it + * reboot -f reboots router + + please also respect: weird choice of wording "more info can be found in the wiki" John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed)]
* John Crispin [12.04.2013 21:38]: > >+=== FAILSAFE MODE active > >+ some useful commands: > > nitpick: what makes them more useful than other commands ? useful > seems to be a superfluous adjective failsafe mode is very restricted, so there is not much senseful to do. we can abbr. it: 'some commands' ? > >+ * firstboot reset settings to factory defaults > >+ * mount_root mounts partition with config files > > the FS is called "root" not "the one with config files" this help is especially for the non-experts, so easy words. maybe: 'mounts root partition including config files' ? > >+ after mount_root: > >+ * passwd reset root's password > >+ * /etc/configdirectory with config files > >+ leave system with: > > maybe "reboot the system" ? ... we are rebooting it and not leaving it ok > >+ * reboot -f reboots router > >+ > >+ please also respect: > > weird choice of wording "more info can be found in the wiki" are you a native speaker? so i should thrust you 8-) (i'am not!). thanks for your feedback. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [base-files] Failsafe-mode: print short help on commandline (signed)]
let me fix up the wording a bit and push a slightly different version of the patch ;) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel