This file will contain common procedures to deal with network interfaces.
Initially provides network_get_ipaddr(), network_get_ipaddr6(),
network_get_subnet() and network_get_subnet6() to determine the
primary IP addresses or subnets of a given logical interface.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31935 3c298f89-4303-0410-b956-a3cf2f4a3e73
- Introduce new Kconfig symbols VERSION_DIST, VERSION_NICK, VERSION_NUMBER and VERSION_REPO to specify distribution, release name, version and repository for a given build
- Introduce include/version.mk to provide common helpers for packages dealing with versions
- Make opkg use version.mk to populate the opkg.conf template
- Make base-files use version.mk to populate /etc/openwrt_version, /etc/openwrt_release and /etc/banner
The available placeholders are:
%D .. Replace with $(CONFIG_VERSION_DIST), default to "OpenWrt"
%d .. Like %D, but all characters made lowercase and spaces substituted with "_" (e.g. "openwrt")
%N .. Replace with $(CONFIG_VERSION_NICK), default to the build tree release (e.g. "Attitude Adjustment")
%n .. Like %N, but all characters made lowercase and spaces substituted with "_" (e.g. "attitude_adjustment")
%V .. Replace with $(CONFIG_VERSION_NUMBER), default to the build tree release (e.g. "r31262")
%v .. Like %V, but all characters made lowercase and spaces substituted with "_"
%C .. Replace with $(CONFIG_VERSION_NUMBER), default to "Bleeding Edge"
%c .. Like %C, but all characters made lowercase and spaces substituted with "_" (e.g. "bleeding_edge")
%U .. Replace with $(CONFIG_VERSION_REPO), default to "http://downloads.openwrt.org/snapshots/trunk/%T/packages"
%R .. Replace with the current build tree revision (e.g. "r31262" or "75488c4a05b8033cf69e91874a61852db7ba9c6c")
%T .. Replace with the current target (e.g. "ar71xx")
%S .. Replace with the current target/subtarget combo (e.g. "adm5120/router_le")
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31262 3c298f89-4303-0410-b956-a3cf2f4a3e73
To supply custom network settings, it is better to embed a complete network config file using the
files/ overlay, the old image lan preconfig options are also very limited in scope and actually collide
with sysupgrade and firstboot hardware detection on at least ar71xx and possibly other targets, therfore
drop this facility.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31258 3c298f89-4303-0410-b956-a3cf2f4a3e73
Solves broken key based dropbear login with empty password after r28935.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29130 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add service_check function for checking if a process is alive
* add service_signal for sending arbitrary signals to a process
* change service_stop to send a TERM signal first, wait for the process to die and send a KILL signal if it doen't
* have service_kill print a warning on STDERR stating it has been deprecated
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28865 3c298f89-4303-0410-b956-a3cf2f4a3e73
Adds symlinks for printf and wc to make life happier in the sysupgrade ramdisk.
Also make code more readable by escaping that overly long line.
Signed-off-by: Daniel Golle <dgolle@allnet.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28616 3c298f89-4303-0410-b956-a3cf2f4a3e73
The rdate applet proved to be too unreliable to obtain the current time on boot:
- public time servers are rare and often unreachable or overloaded
- rdate does not daemonize, it needs a network connection the moment it is started, leading to race conditions
- the /etc/config/timeserver configuration is overly complex and there is no reliable way to disable rdate invocations
- the time protocol as specified in RFC 868 is considered obsolete
This commit adds an init script /etc/init.d/sysntpd which starts and stops the busybox ntpd accordingly.
The builtin ntpd can be disabled by either disabling the init script, removing the symlink to busybox or
by clearing the timeserver list in /etc/config/system.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28612 3c298f89-4303-0410-b956-a3cf2f4a3e73
If a user invoked /sbin/ifup to bring up an interface, the setup used to fail
in case of wireless networks tied to a non-bridged interface definition.
Likewise, the bringup of "lan" in the default configuration will reinitialize
the bridge but do not re-join the wireless network to it, requiring an extra
call to /sbin/wifi (which might not be possible anymore due to a severed link
if connected wirelessly).
The changeset modifies the "ifup" command to search for related wireless
devices and call "wifi up" on them if applicable. This way the commands for
wireless and non-wireless interfaces are unified from a cli point of view.
The "ifup -a" case has not been changed to keep the logic of the
/etc/init.d/network boot sequence. This might be changed later.
Solves #9763.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27720 3c298f89-4303-0410-b956-a3cf2f4a3e73
- option ipv4_xyz is mapped to /proc/sys/net/ipv4/{conf,neigh}/xyz
- option ipv6_xyz is mapped to /proc/sys/net/ipv6/{conf,neigh}/xyz
This allows e.g. "option ipv6_proxy_ndp 1" to enable NDP proxying on wan.
Fixes ticket #8699.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27653 3c298f89-4303-0410-b956-a3cf2f4a3e73