[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
Inside every LuCI package you need to clear luci-indexcache and
sometimes when installing non LuCI pacakges it's also needed to clear
it. Easier put it into default_postinst().
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
SVN-Revision: 42923
[base-files] shell-scripting: fix wrong usage of '==' operator
normally the '==' is used for invoking a regex parser and is a bashism.
all of the fixes just want to compare a string. the used busybox-ash
will silently "ignore" this mistake, but make it portable/clean at least.
this patch does not change the behavior/logic of the scripts.
Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
SVN-Revision: 42911
This allows IPv6 to set up without IPv4 being up thus
IPv6-only or IPv6+DS-Lite working with the default config.
Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 42848
it is now possible to inlie the uid and gid in the syntax
USERID:=username=uid:group=gid:group2=gid2:...
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 42838
During boot, a not found message is displayed for systems which do
not have uci 'network.globals.ula_prefix' defined in
/etc/config/network. The error message itself is not used and can
be ignored.
Signed-off-by: Michel Stam <m.stam@fugro.nl>
SVN-Revision: 42755
Add a third argument to ucidef_set_interface_raw, which is specifying
the protocol.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 42665
the postinst script enables/starts the init.d scripts upon package installation
and installs the users required by the package.
the prerm script stops and disables the init.d scripts.
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 42470
somebody started to set a function returncode in the validation
stuff and everybody copies it, e.g.
myfunction()
{
fire_command
return $?
}
a function automatically returns with the last returncode,
so we can safely remove the command 'return $?'. reference:
http://tldp.org/LDP/abs/html/exit-status.html
"The last command executed in the function or script determines the exit status."
Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>
SVN-Revision: 42278
this allows targets to use the new uci-default helper which will generate
a file called /etc/board.json. a tool called /bin/config_generate can then
be used to generate the default uci settings.
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 42185
When looking for the first ipaddr also consider the current prefix just
like network_get_ipaddrs6 does. If ipv6-address was empty the function
did not return the first ipaddr even if the list was non-empty.
fixes commit 83e9122f88a002871d5cdf421cf6aa6052b7e006
Signed-off-by: Henning Schild <henning@hennsch.de>
SVN-Revision: 42139
Make sure they don't break the sed command, and also make device_info
and openwrt_release more robust for parsing by scripts
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41885
Creates /etc/device_info which will be used to fill in information for
WPS and other protocols that need manufacturer/device information
This helps with creating OpenWrt firmware for OEM or rebranded devices.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41884
If the sysupgrade scripts is called under upgraded, it will not kill all
other processes as it should to avoid interference by locked filesystem.
This patch checks the parent and if it is upgraded, it kills all.
Signed-off-by: André Valentin <avalentin@marcant.net>
SVN-Revision: 41563
ubox validate_data defines yes/no as valid boolean options, do the same in
config_get_bool too.
Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 41405
Switches /lib/functions/network.sh from jshn based json parsing to
jsonfilter expression while keeping the existing api.
Expensive methods like "network_find_wan" are up to 20x faster now.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 41281
Also add some more busybox symlinks which are useful for sysupgrade
on UBI-enabled devices.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
SVN-Revision: 41125
Seems like the reverse order relies on GNU specific getopt hackery which
musl does not replicate
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41045
Since svn rev [38557] we support power buttons, for example
the ACPI power button on x86 machines.
Add a simple shutdown script to /etc/rc.button, to gracefully shutdown
the machine after the power button is pressed.
Tested on x86 and x86_64 in a kvm virtual machine.
Signed-off-by: Stefan Hellermann <stefan@the2masters.de>
SVN-Revision: 40909