Commit Graph

38 Commits (34bbbbf9c3b39e7b2d81df590aad5cdbd00280d6)

Author SHA1 Message Date
Florian Eckert c31f0421ce base-files: suppress uci not found output in login.sh
Fix "uci: Entry not found" output if "ttylogin" is not set in
"etc/config/system"

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
7 years ago
Matthias Schiffer b9a408c2b4
base-files: add ARCH_PACKAGES to openwrt_release and os-release
Knowing the package architecture at runtime can be useful, e.g. to
configure opkg repository URLs. The value of ARCH_PACKAGES ("%A" in
VERSION_SED) as added to openwrt_release (as DISTRIB_ARCH) and os-release
(as LEDE_ARCH).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Jo-Philipp Wich 5f3c96c285 build: adjust version number handling
Move the revision info to the VERSION_CODE variable and default VERSION_NUMBER
to CURRENT for master branch builds.

Also introduce a new menuconfig option CONFIG_VERSION_CODE which allows users
to override the revision value put into VERSION_CODE and adjust the template
files used by the base-files package to accomodate for the changed semantics.

While we're at it, also adjust the various URLs to match the current web site.

After this commit, the relevent files will look like the examples given below:

    # cat /etc/openwrt_version
    r2398+1

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='CURRENT'
    DISTRIB_REVISION='r2398+1'
    DISTRIB_CODENAME='reboot'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Reboot CURRENT r2398+1'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="CURRENT, Reboot"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Reboot CURRENT"
    VERSION_ID="current"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2398+1"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Reboot CURRENT r2398+1"

On a release branch, those files would look like:

    # cat /etc/openwrt_version
    r2399

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='16.12-CURRENT'
    DISTRIB_REVISION='r2399'
    DISTRIB_CODENAME='test_release'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Test Release 16.12-CURRENT r2399'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="16.12-CURRENT, Test Release"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Test Release 16.12-CURRENT"
    VERSION_ID="16.12-current"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2399"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Test Release 16.12-CURRENT r2399"

On a release tag, those files would look like:

    # cat /etc/openwrt_version
    r2500

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='17.02.1'
    DISTRIB_REVISION='r2500'
    DISTRIB_CODENAME='mighty_unicorn'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Mighty Unicorn 17.02.1 r2500'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="17.02.1, Mighty Unicorn"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Mighty Unicorn 17.02.1"
    VERSION_ID="17.02.1"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2500"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Mighty Unicorn 17.02.1 r2500"

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Daniel Dickinson f954f4337b base-files: Add standard os-release file
/etc/os-release is the standard distribution release information
file, therefore add it (and image configuration options for
fields not previously present in LEDE).  Once it is deemed
reasonable the non-standard openwrt_release, openwrt_version,
and device_info files could be removed (that is with this patch
we consider them deprecated in favour of the standard file).

Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
8 years ago
John Crispin dc92917409 image / basefiles: make console password configurable
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Felix Fietkau c2b5767572 base-files: move network related scripts to a separate package to make the transition to netifd easier
SVN-Revision: 28495
13 years ago
Felix Fietkau 803e9ceb90 base-files: /usr/lib/common.awk is only used by /bin/ipcalc.sh, move the code there
SVN-Revision: 25495
13 years ago
Jo-Philipp Wich 4e34fc521c base-files: derive lease_acquired dhcp state var from /proc/uptime
SVN-Revision: 25452
13 years ago
Jo-Philipp Wich 3bd7985a0b base-files: the busybox update to v1.15.3 completely broke udhcpc route option handling, repair default.script to work with the new format (#6435)
SVN-Revision: 24778
14 years ago
Jo-Philipp Wich d0ab35c115 base-file: add metric option for static and dhcp protos, this simplifies the management of multiple default routes
SVN-Revision: 24020
14 years ago
Jo-Philipp Wich 0fda5f7507 base-files: utilize uci_get_state to read the previous dhcp router address in udhcpc default script. The setup_switch() procedure provided by swconfig calls config_load() during network restart and thus confuses udhcpc's uci state keeping resulting in a missing default route on each second network restart. Bypass the cached state vars and query uci directly to make the script immune against unwanted runtime changes.
SVN-Revision: 23211
14 years ago
Jo-Philipp Wich 84b7b812f3 base-files: cached state vars after scan_interfaces might be out of sync when binding dhcp leases, this could lead to an unconfigured wan interface in certain circumstances. Replace config_get calls with uci_get_state
SVN-Revision: 23091
14 years ago
Jo-Philipp Wich 261d41a906 base-files: - use add_dns() and remove_dns() for when changing resolv.conf.auto for static or dhcp interfaces - force 0644 permissions when creating resolv.conf.auto, fixes dnsmasq permissions denied problem with pppd interfaces - revert dns servers in /sbin/ifdown - bump package revision
SVN-Revision: 21638
14 years ago
Jo-Philipp Wich ea06a67eac base-files: use uci_get() wrapper (#7312)
SVN-Revision: 21490
14 years ago
Jo-Philipp Wich 250b52f673 base-files: revert dhcp state information on ifdown and restore pre-r19530 behaviour in udhcp default.script
SVN-Revision: 19597
14 years ago
Jo-Philipp Wich 520ea8e5f9 base-files: fix udhcpc address acquisition on network restart (patch by Scott Dudley)
SVN-Revision: 19530
14 years ago
Felix Fietkau e69a6f1b82 base-files: remove obsolete stuff from common.awk
SVN-Revision: 18109
15 years ago
Felix Fietkau 91d40a14af Revert "fix nonhotpluggable networks not being brought up. Closes #2781" (r17527) until we've solved the race conditions it creates
SVN-Revision: 17544
15 years ago
Travis Kemen 27915ac778 fix nonhotpluggable networks not being brought up. Closes #2781
SVN-Revision: 17527
15 years ago
Vasilis Tsiligiannis e5b097425d udhcpc: Pass all events to udhcpc.user
Petitboot and maybe other apps need to know when
the dhcp lease is lost.  Move the udhcpc.user call
to send it all udhcpc events.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>

SVN-Revision: 16815
15 years ago
Felix Fietkau 7a576b004e allow udhcpc to work properly for interfaces that are not configured through uci
SVN-Revision: 16664
15 years ago
Felix Fietkau d196e4087e udhcpc: add cidr routes support (patch from #5299)
SVN-Revision: 16433
15 years ago
Jo-Philipp Wich 2ee67f7272 base-files: fixup resolv.conf check in udhcpc script
SVN-Revision: 15903
15 years ago
Jo-Philipp Wich 33c38fba27 base-files: - restore device, ifname and aliases state in dhcp script - make sure that resolv.conf.tmp is written once at least for statically configured dns
SVN-Revision: 15753
15 years ago
Jo-Philipp Wich ca609a2431 base-files: replace udhcpc script with an improved version
SVN-Revision: 15635
15 years ago
Felix Fietkau 6a50bf433a udhcpc: run dhcp hotplug events after dns has been set
SVN-Revision: 15095
15 years ago
Jo-Philipp Wich 2d672ef2f5 base-files: allow option dns to override dhcp assigned dns servers
SVN-Revision: 14562
15 years ago
Felix Fietkau 35b92f0c99 don't emit ifup hotplug events on dhcp renew - use a new iface hotplug type 'update' instead; fixes #3906
SVN-Revision: 12671
16 years ago
Felix Fietkau 0cf1a58282 Here comes the new UCI. Enjoy :)
SVN-Revision: 10367
16 years ago
Felix Fietkau f7ff1d6d0f fix a few issues with dynamically assigned interfaces
SVN-Revision: 8765
17 years ago
Felix Fietkau 1b4380b8ed avoid a race condition that might lead to dnsmasq reading an empty resolv.conf (#2007)
SVN-Revision: 7952
17 years ago
Felix Fietkau 4f16e9cc3e keep track of the network interface states (stored in uci format in /var/state/network, overlay over /etc/config/network)
SVN-Revision: 7643
17 years ago
Mike Baker 924cd1ffc9 fix typo
SVN-Revision: 7244
17 years ago
Mike Baker 3e112cbedb cleaner version of the udhcp script
SVN-Revision: 7222
17 years ago
Florian Fainelli 3e9c0379ba Do not suppress routes if the router received on renew is the same (#138)
SVN-Revision: 7215
17 years ago
Felix Fietkau a44c286fdb nuke mdev and replace it with hotplug2 :)
SVN-Revision: 6512
17 years ago
Felix Fietkau 656412d1a3 Forward port whiterussian resolv.conf changes /etc/resolv.conf links to /tmp/resolv.conf /tmp/resolv.conf links to /tmp/resolv.conf.auto by default (which is where the ISPs nameserver is in) When dnsmasq starts, it replaces /tmp/resolv.conf with a file pointing to 127.0.0.1
SVN-Revision: 6043
18 years ago
Felix Fietkau 59a06c71cb rename default/ to files/
SVN-Revision: 5622
18 years ago