Commit Graph

1017 Commits (e49f8f122c5a6d73d3cdb948b8419ae26d7b45d2)

Author SHA1 Message Date
Felix Fietkau 32d2457fda base-files: remove duplicate stop_service() function.
It was introduced in commit 2f966e8, "base-files: add a post start hook
for procd managed services".

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40576 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-27 18:48:57 +00:00
Felix Fietkau 600b550460 base-files: remove duplicate wps button handler (#15621)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40528 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-18 17:27:38 +00:00
Felix Fietkau 991bea678a base-files: add back missing function for find_mtd_part to /lib/functions.sh (fixes #15496)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40426 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-08 21:17:49 +00:00
John Crispin e11ba4da13 base-files: the ubi tol should be installed when jumping to ram_fs
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40420 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 15:35:20 +00:00
John Crispin 1a579e57fe base-files: make use of new fstools
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40416 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 15:10:15 +00:00
Felix Fietkau d0973094c9 /lib/functions.sh: remove config_rename()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40412 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 10:29:51 +00:00
Felix Fietkau 8ce376a524 /lib/functions.sh: move rarely used mtd and macaddr related functions to /lib/functions/system.sh
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40411 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 10:29:47 +00:00
Felix Fietkau 79be8946a7 /lib/functions.sh: remove jffs2_mark_erase()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40410 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 10:29:42 +00:00
Felix Fietkau 63ec4c522f base-files: remove config_clear() and list_remove()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40409 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 10:01:59 +00:00
Felix Fietkau fa7d088f18 base-files: move uci_apply_defaults() to /etc/init.d/boot
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40408 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 10:01:54 +00:00
Felix Fietkau ad3793303a /lib/functions.sh: remove hotplug_dev()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40406 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 09:50:26 +00:00
Felix Fietkau 6fc0daa25c /lib/functions.sh: remove strtok()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40405 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 09:50:23 +00:00
Felix Fietkau fbddef3dc9 /lib/functions.sh: move preinit related functions to /lib/functions/preinit.sh
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40404 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 09:50:19 +00:00
Felix Fietkau b4ee46fb86 /lib/functions.sh: remove pi_include()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40403 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 09:50:15 +00:00
Felix Fietkau 9e3ce3f75f /lib/functions.sh: remove jffs2_ready()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40402 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 09:50:11 +00:00
Felix Fietkau 4a736626c1 /lib/functions.sh: remove support for non-overlayfs overlay fopivot types
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40401 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-07 09:50:07 +00:00
John Crispin 937a78b306 ubi-utils: mini version of mtd-utils that only includes ubi tools
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40367 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-03 14:26:42 +00:00
John Crispin 2b77148377 fstools: add the new fstools package
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39895 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-03-12 19:32:51 +00:00
Imre Kaloz 6cab8a6c0c [base-files]: the root password should be empty for real, like before
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39650 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-02-21 10:39:14 +00:00
John Crispin 6cd00fa25c base-files: split /etc/init.d/boot into 2 files
this allows us to bind a procd trigger to system.@system[-1]

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39615 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-02-18 13:33:40 +00:00
Jo-Philipp Wich ce73f9f145 base-files: expose taint flags in /etc/openwrt_release
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39437 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-01-31 15:48:47 +00:00
Jo-Philipp Wich b187527a51 Add sysfixtime init script, replacement of luci_fixtime
Simply scan for the most recent file in /etc and set
system time to this file modification time if it's in the future
It allow some time dependent program to work immediatly
without waiting for ntpd to sync

v1: v2: bad approach
v3: simply scan /etc, thanks to Bastian Bittorf for the idea
v4: use sort -n, thanks to Catalin Patulea
v5: use [] instead of [[]], thanks to Andreas Mohr
v6: use openwrt style, thanks to Bastian Bittorf

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39422 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-01-29 13:17:03 +00:00
Luka Perkov 79679bce53 [package] base-files: add ucidef_add_switch_port function
Signed-off-by: Luka Perkov <luka@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39372 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-01-23 11:33:41 +00:00
John Crispin 1f0ac4101b sysupgrade: do not kill any processes in failsafe
sysugrade killed the lock causing failsafe to stop

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39318 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-01-17 22:12:05 +00:00
John Crispin 41d0bfcc1f base-files: fix mount-utils incompatibility
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39169 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-12-27 21:15:09 +00:00
Jo-Philipp Wich 4ce04ce60f base-files: ipcalc.sh: support bit length as netmask parameter
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39100 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-12-16 16:29:23 +00:00
Jo-Philipp Wich 8dcb4e5990 base-files: add network_get_protocol() to /lib/functions/network.sh
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39099 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-12-16 16:28:45 +00:00
Felix Fietkau 59559e7972 /sbin/wifi: reload network/wireless on wifi restart
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39036 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-12-11 19:48:19 +00:00
Luka Perkov d723a38780 [package] base-files: fix whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39006 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-12-09 11:30:14 +00:00
Felix Fietkau 9f6dd226eb wifi: restart netifd wifi interfaces on the "up" command like the old variant
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38990 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-12-02 16:53:27 +00:00
Felix Fietkau 8a98d2594a wifi: rename the "reload" (restarting non-netifd wifi) command to "reload_legacy"
Add a new "reload" command that reloads the netifd config as well

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38989 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-12-02 16:53:24 +00:00
Felix Fietkau 3fab0ab03f netifd: add wireless configuration support and port mac80211 to the new framework
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38988 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-12-02 16:41:03 +00:00
John Crispin 3b4cd0a50e base-files: allow users to delect debug level during boot
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38909 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-25 08:34:55 +00:00
Felix Fietkau 37d0d29e51 base-files: add the DEVICENAME variable for hotplug scripts
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38861 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-19 00:03:39 +00:00
Felix Fietkau 9383e3c3c4 ar71xx: Unifi AP Pro sysupgrade patch
The current implementation of mtd will not append the backup
file created by sysupgrade to the correct partition, as mtd will append
the data to first jffs2 partition it finds. As the kernel is also
stored on a jffs2 partition (which resides before the overlay
partition), the data will be appended to this partition.

To fix this problem, a new option

-s <number>             skip the first n bytes when appending data to the jffs2 partiton, defaults to "0"

is added to mtd.

Signed-off-by: Peter Wagner <tripolar@gmx.at>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38807 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-14 19:38:54 +00:00
Gabor Juhos 3e44099b61 base-files: add macaddr_canonicalize helper function
In commit r38690, the MAC address canonicalization
has been converted to use 'tr' instead of 'printf'.
This only works if with MAC addresses which uses
the 'xx:xx:xx:xx:xx:xx' format.

However on some boards, the MAC addresses are stored
in different format in the mtd partition. Some vendors
are using hyphens or dots as separators instead of
colons. Also the leading zeroes may be missing from the
individual octets or those are replaced with spaces.

Add a new function which can be used to convert these
into the 'xx:xx:xx:xx:xx:xx' format. Also update the
'mtd_get_mac_ascii' function to use the new helper.

The helper function is based on this code:
  http://isquared.nl/blog/2010/08/11/Bash-function-to-canonicalize-MAC-addresses/

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38803 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-14 17:44:42 +00:00
Luka Perkov a2f5118bb7 [package] base-files: don't enter failsafe if triggered by switch
Fixes failsafe issues with switches after r38725.

Signed-off-by: Luka Perkov <luka@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38770 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-11 23:34:11 +00:00
Hauke Mehrtens f82ba95657 base-files: don't kill nas for sysupgrade
Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38766 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-11 22:12:58 +00:00
John Crispin 9475a183be base-files: fix typo in rfkill script
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38742 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-11 18:12:30 +00:00
John Crispin 8a3453f142 base-files: update rfkill script to work with slider buttons
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38729 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-11 12:19:22 +00:00
John Crispin 07a508345d base-files: add a generic wps button handler
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38726 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-11 12:19:10 +00:00
Gabor Juhos e3b2c6418f base-files: mtd_get_mac_ascii bugfix
The mtd_get_mac_ascii utility function was broken. This fixes it.

  - Remove the superfluous include of /lib/functions.sh. The
    function is already in that file so it is pointless,
  - only use a variable if the whole key word matches,
  - don't try to process the MAC address if it is empty,
  - use 'tr' to canonicalize the MAC address,

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[juhosg: add more fixes, update commit message]
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38690 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-08 12:16:21 +00:00
John Crispin a0a713c12f base-files: Make /etc/init.d/boot restartable
Only reload hostname and timezone config on /etc/init.d/boot restart.
Module loading and basic boot setup is only done during boot.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38670 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-11-07 12:45:57 +00:00
Steven Barth 414c5be62b Add package signing infrastructure
Add package signing key and certificate configuration options to the
"Image configuration" submenu. If enabled, the Packages.gz list will
be signed as file Packages.sig. The passphrase for the signing key can
be sourced from a file or entered by the user. The signing certificate
is automatically added to the firmware image if opkg-smime is selected.

Signed-off-by: Evan Hunt <each@isc.org>
Signed-off-by: Steven Barth <steven@midlink.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38284 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-10-02 12:12:10 +00:00
John Crispin db85247aba base-files: add a post start hook for procd managed services
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38024 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-09-17 21:45:34 +00:00
Jo-Philipp Wich 176af6bad9 base-files: implement -l (--list-backup) sysupgrade parameter to list the files that would be backed up
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37627 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-07-31 18:11:55 +00:00
Jo-Philipp Wich 7278ed6283 base-files: abort sysupgrade if file specified with --restore-config is not found
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37624 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-07-31 14:10:34 +00:00
Jo-Philipp Wich 6578d45c34 base-files: implement -T (--test) sysupgrade parameter to verify image without actually flashing it
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37620 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-07-30 16:42:05 +00:00
John Crispin f647d04afe base-files: be verbose when entering failsafe due to a button being pressed
Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37535 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-07-25 20:28:36 +00:00
Gabor Juhos c475e599b4 base-files: add mtd_get_part_size helper
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37475 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-07-20 09:25:49 +00:00