Commit Graph

980 Commits (34bbbbf9c3b39e7b2d81df590aad5cdbd00280d6)

Author SHA1 Message Date
Jo-Philipp Wich b98f78b1c1 base-files: rework config generation logic
Now that config_generate is able to generate the entire /etc/config/system
from scratch we can apply the same logic as used for /etc/config/network;
when the configuration file exists already then do not do anything, else
generate it from the values provided by /etc/board.json .

In order to facilitate that move the file existance checking inside
/bin/config_generate and call it unconditionally from /bin/board_detect.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 07f03d0833 base-files: support port_state LED types in board.d
Add support for handling port_state LEDs as used by ADM5120.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 528b8f6f93 base-files: support hostname and ntp servers through board.d
Add support for specifying hostname and NTP servers via /etc/board.d/ scripts.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 33a4d22f4c base-files: reset LED state
Attempt to reset all LED states before applying the UCI configuration to
avoid leaving disabled LEDs behind in lingering glowing state, e.g. when
changing the sysfs entry in the config from one hardware LED to another.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 7f69458296 base-files: rework postinstall uci-defaults handling
Some package postinstall operations, e.g. those emitted by the LuCI build
system, source and delete the uci-defaults themselves upon package insteall,
causing the generic defaults apply code to trigger shell errors like:

    .../luci-app-ddns.postinst: .: line 130: can't open './40_luci-ddns'

Rework the generic apply code to check the existence of the uci-defaults
script before trying to source it, use sed to prefilter the list of entries
from the control file and perform the directory change in a subshell,
avoiding the need for cd $OLDPWD.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 1012701014 x86: generalize partition discovery for sysupgrade
Generalize the partition discovery in sysupgrade in order to fix sysupgrade
and config backup/recovery on MMC block devices which use a different naming
scheme compared to mtdblock or sd* devices.

The change also adds the find applet to the ramdisk utilities so that upgrade
code can rely on it.

The commit is based on the initial submission by Russell Senior at
http://patchwork.ozlabs.org/patch/625440/ .

Signed-off-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Hannu Nyman 3193053df7 Centralize setting of all version info to include/version.mk
Centralize setting all version information in include/version.mk
* Set RELEASE env variable in include/version.mk instead of toplevel.mk.
  Stop exporting the variable.
* Remove hardcoded release name from /etc/banner

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
8 years ago
John Crispin a39ac242cc base-files: fix some failsafe issues
* if the shell was closed booting continued

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Kevin Darbyshire-Bryant 8d105653b1 base-files: sysfixtime typo in exclude dnsmasq.time
Typo, missing space before ] in previous commit caused shell syntax
failure and incorrect restoration of time.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
8 years ago
Kevin Darbyshire-Bryant 2b1556d3e0 base-files: sysfixtime exclude dnsmasq.time
dnsmasq maintains dnsmasq.time across reboots and uses it as a means of
determining if current time is good enough to validate dnssec time
stamps.  By including /etc/dnsmasq.time as a time source for sysfixtime,
the mechanism was effectively defeated because time was set to the
last time that dnsmasq considered current even though that time is in
the past.  Since that time is out of date, dns(sec) resolution would
fail thus defeating any ntp based mechanisms for setting the clock
correctly.

In theory the process is defeated by any files in /etc that are newer
than /etc/dnsmasq.time however dnsmasq now updates the file's timestamp
on process TERM so hopefully /etc/dnsmasq.time is the latest file
timestamp in /etc as part of LEDE shutdown/reboot.

Either way, including /etc/dnsmasq.time as a time source for
sysfixtime is not helpful.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
8 years ago
Jo-Philipp Wich 21f460e0c1 Revert "base-files: sysfixtime exclude dnsmasq.time"
This reverts commit 382779e009.

Reverting this commit due to a missing Signed-off-by.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Kevin Darbyshire-Bryant 382779e009 base-files: sysfixtime exclude dnsmasq.time
dnsmasq maintains dnsmasq.time across reboots and uses it as a means of
determining if current time is good enough to validate dnssec time
stamps.  By including /etc/dnsmasq.time as a time source for sysfixtime,
the mechanism was effectively defeated because time was set to the
last time that dnsmasq considered current even though that time is in
the past.  Since that time is out of date, dns(sec) resolution would
fail thus defeating any ntp based mechanisms for setting the clock
correctly.

In theory the process is defeated by any files in /etc that are newer
than /etc/dnsmasq.time however dnsmasq now updates the file's timestamp
on process TERM so hopefully /etc/dnsmasq.time is the latest file
timestamp in /etc as part of LEDE shutdown/reboot.

Either way, including /etc/dnsmasq.time as a time source for
sysfixtime is not helpful.
8 years ago
Vittorio G (VittGam) d742e1b513 base-files: Enhancements to /etc/profile
- Update the terminal window title with the current directory and hostname, if using an xterm-compatible terminal emulator.
- Add ll, an useful alias to ls.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
8 years ago
Vittorio Gambaletta (VittGam) 40f933d7ff base-files: Fix config_generate when there are no switch VLANs or ports configured in board.json.
The json_select call fails when there are no roles or ports objects in board.json. "json_select .." must not be executed after failing.

This fixes for example LEDs not being set up in /etc/config/system.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
8 years ago
Daniel Golle 9b9c78e071 base-files: evaluate uci-defaults on run-time installations
Packages may install scripts into /etc/uci-defaults to be executed once
after installation, usually at the first boot of the target. This works
fine if the package was installed to the rootfs during build or using
the ImageBuilder.
If the package is installed using opkg during run-time uci-defaults
were applied only after a reboot of the device. Avoid the need to
reboot by evaluting the package's uci-defaults in default-postinst.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 years ago
Jo-Philipp Wich a6f76bffd8 signing: remove unatteded build key and use current keyring instead
Remove the public unatteded buildkey from the opkg package to avoid
having hardcoded keys in tree. Use the external keyring package instead
which can be easily updated by users.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
John Crispin 4a8e960c62 base-files: fix group/user settings after sysupgrade
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin ed07ef1601 base-files: split user/group addition code into a function
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin d72e538e89 base-files: add new public key used by unattended builds
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin 528ffec3cd base-files: remove ununsed login.sh
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin b4e33a1c08 base-files: Allow to disable failsafe mode
Signed-off-by: Daniel Dickinson <openwrt@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
John Crispin 5e85ae9e4c base-files: fix error message during boot
preinit spews out this message

"cat: can't open '/proc/device-tree/model': No such file or directory"

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin fa69553900 branding: add LEDE branding
Signed-off-by: John Crispin <blogic@openwrt.org>
8 years ago
Hauke Mehrtens ea6d36111b base-files: allow to set arbitrary ip address and netmask
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 49179
8 years ago
John Crispin 63c9caaa91 base-files: add function ucidef_set_interface_raw to enable default configuration on interfaces other than lan and wan.
Signed-off-by: Micke Prag <micke.prag@telldus.se>

SVN-Revision: 48976
8 years ago
Felix Fietkau 956794c2e9 base-files: change type of adsl and vdsl to dsl only
Instead of having two different types adsl and vdsl just create one dsl
type. This way we can use the same luci code for adsl and vdsl and the
config parameters are not so different.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48944
8 years ago
Felix Fietkau 4ac99abeb3 lantiq: do not set default firmware file
We are now shipping a DSL firmware, do not set it by default to some
file name.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48941
8 years ago
Jo-Philipp Wich eced3b3a35 base-files: support passing mode to ucidef_set_led_netdev()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48806
8 years ago
Felix Fietkau 285d9e364e base-files: add support for speed mask to switch config init scripts
This patch adds extra parameter to switch LED trigger initialization
functions.  New functionality maintains backward compatibility, so
calling functions without setting new speed_mask parameter works
as expected.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 48776
8 years ago
John Crispin c0c3f2d4c9 leds: support oneshot as well as timer triggers
oneshot and timer have the same configuration options, just a different
trigger name.

Signed-off-by: Karl Palsson <karlp@etactica.com>

SVN-Revision: 48770
8 years ago
Jo-Philipp Wich 117cef6d44 base-files: add netifd's default prelocal table to /etc/iproute2/rt_tables
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48685
8 years ago
Jo-Philipp Wich 4aeeead303 x86: preserve partition table on sysupgrade
With this patch sysupgrade will write directly to the partitions
instead of to the main disk.  The UUID is copied from the image
to the MBR as well.  This prevents the mbr from being completely
overwritten and losing the partition table.  The -p option has
been added to maintain the original behavior and overwite the
entire disk with the new image.  Tests have been added to ensure
that the image partitions match up with the active partitions.

Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net>

SVN-Revision: 48682
8 years ago
Jo-Philipp Wich cc289e0adb base-files: honor CONFIG_TARGET_INIT_PATH
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48678
8 years ago
John Crispin e2fd1adaf5 base-files: For sysfixtime use hwclock if RTC available
On systems that have an RTC prefer it to the file-based time fixup (i.e.
use hwclock when there is a permanent clock instead of the faked up time
logic that is needed when there is not RTC).

We can't rely on hctosys kernel feature either as we're usually using
RTC as kernel modules which are usually being loaded after hctosys was
run, leading in the following error:

  hctosys: unable to open rtc device (rtc0)

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>

SVN-Revision: 48661
8 years ago
Felix Fietkau f70c8ba198 base-files: set mac address in default network config via device sections
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48646
8 years ago
Felix Fietkau 57776e68ce base-files: remove default /etc/config/network, generate it via board.d instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48493
8 years ago
Felix Fietkau b7ab6c66cc base-files: fix sysupgrade 'wget' handling for uclient-fetch
change 48451 tried to add support for uclient-fetch by moving
/usr/bin/wget to /bin/wget, but this change kept the symbolic
link to /bin/busybox as install_bin creates links to param 1

the desired fix is to link to uclient-fetch to wget:
  install_bin /bin/uclient-fetch /bin/wget

Signed-off-by: John Clark <inindev@gmail.com>

SVN-Revision: 48483
8 years ago
Felix Fietkau f57419d26e base-files: fix sysupgrade 'wget' handling
with r48379 and r48386 the path of wget changed.
respect that and adjust the dirname.

this fixes #21680

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 48451
8 years ago
Jo-Philipp Wich 740a2ee163 base-files: Fix sysupgrade overlay saving
A previous change to sysupgrade moved the overlay files into upper/
The -c switch generates a list of files to backup, but the sed
calls did not take this into consideration.

Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net>

SVN-Revision: 48281
8 years ago
John Crispin 3f78186f76 base-files: allow timezone to be overriden by zonename (proper zoneinfo support)
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 47980
8 years ago
Felix Fietkau 0936f5b0e0 base-files: cleanup mtd_get_mac_binary hexdump
Remove usage of dd, as per request from Yousong Zhou.
<https://lists.openwrt.org/pipermail/openwrt-devel/2015-December/037743.html>

Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>

SVN-Revision: 47949
9 years ago
Felix Fietkau c74a690661 ar71xx: scan nand ubi partition for ath9k eeprom files
The MR18 stores the ath9k eeprom values on the NAND.
This patch makes it possible to retrieve the images
from there.

Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>

SVN-Revision: 47948
9 years ago
Jo-Philipp Wich 67e1c87012 all: drop old uci-defaults.sh
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47867
9 years ago
John Crispin 2f42d9e27d base-file: remove /tmp/.jail (now useless)
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>

SVN-Revision: 47855
9 years ago
John Crispin ec6b85ca0e base-files: use max_brightness to set LED
LEDs which are controlled by a PWM need to use the supplied
max_brightness instead. Otherwise they might appear to be
very dim / broken.

Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>

SVN-Revision: 47854
9 years ago
Jo-Philipp Wich 08078df83d board.d: add support for gpio_switch sections
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47762
9 years ago
Jo-Philipp Wich 61a99da4f9 base-files: board.d: auto-set model id and name if /tmp/sysinfo is available
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47752
9 years ago
Jo-Philipp Wich 6c8daa6ba3 base-files: board.d: support dsl modems, atm bridges and pppoe protocol
This adds support for specifying the dsl modem, atm bridge configs and setting
the pppoe protocol for wan.

These additions are required to port the Lantiq target to board.d.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47750
9 years ago
Jo-Philipp Wich 527ec2af59 all: remove dummy ucidef_set_interface_loopback() from board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47744
9 years ago
Jo-Philipp Wich f611358870 base-files: board.d: support specifiying the protocol of lan and wan
Some boards, e.g. the Sheeva Plug, require the lan interface to be set
to DHCP instead of a static address, therfore support that.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47732
9 years ago
Jo-Philipp Wich ac9bed4bc0 base-files: board.d: support timer leds
Add ucidef_set_led_timer() and handling for it to config_generate.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47731
9 years ago
Jo-Philipp Wich b3f8340a5e base-files: board.d: support ide leds
Add ucidef_set_led_ide() to define "ide-disk" triggered leds.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47729
9 years ago
Jo-Philipp Wich 734ae1bd17 base-files: uci-defaults-new.sh: fix for handling multiple ifnames
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47728
9 years ago
Jo-Philipp Wich 9b02e73188 board.d: merge ucidef_add_switch() and ucidef_add_switch_ports()
This changes uci-defaults-new.sh, config_generate and all relevant board.d
files in order combine ucidef_add_switch() and ucidef_add_switch_ports() into
a single function.

Also removes now superfluous enable and reset arguments.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47721
9 years ago
Jo-Philipp Wich d17a64c7c0 base-files: uci-defaults-new: remove reset/enable args of ucidef_add_switch()
Out of 69 switch definitions, only 3 pass something different than "1" as
values for reset and enable, with one of those three being invalid.

This change ...

 * removes the reset and enable arguments from ucidef_add_switch()
 * unconditionally writes reset:1 and enable:1 to JSON
 * converts the three users of nonstandard values to ucidef_add_switch_attr()

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47720
9 years ago
Jo-Philipp Wich 80f767d093 base-files: uci-defaults-new, config_generate: refactor code and drop old vlans
Remove support for now unused ucidef_add_switch_vlan(), move port->vlan and
vlan->interfaces conversion to uci-defaults-new.sh and massively simplify
config_generate.

This change prepares the following upcoming steps:

 * Eliminate use of ucidef_set_interface_lan_wan() for switch only devices
 * Merge ucidef_add_switch() with ucidef_add_switch_ports()

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47719
9 years ago
Jo-Philipp Wich 1871619e72 base-files: config_generate: add missing chunks of force tag support
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47718
9 years ago
Jo-Philipp Wich 73a4e0334c base-files: uci-defaults-new, config_generate: allow force tagged cpu ports
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47679
9 years ago
Jo-Philipp Wich a826098e2b base-files: uci-defaults-new: only emit force_link for additional ifaces
Only se4t the force_link property for non-lan, non-wan ifaces as it is
unnecessary in the default cases.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47675
9 years ago
Jo-Philipp Wich b64f953cd8 base-files: uci-defaults-new: fix unquoted variables
Properly quote variables in ucidef_set_interface_lan() and
ucidef_set_interface_lan(), otherwise interfaces with multiple devices
are not properly written into the configuration.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47673
9 years ago
Jo-Philipp Wich cfac7289c7 base-files: uci-defaults-new: add board id and name helpers
Add ucidef_set_board_id() and ucidef_set_model_name() procedures to store
model information in the board.json file.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47671
9 years ago
Jo-Philipp Wich 0e0119b6f0 base-files: uci-defaults-new, config_generate: support for gpio leds
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47660
9 years ago
Jo-Philipp Wich aa4c5fd2b0 base-files: config_generate: regroup led generator code
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47659
9 years ago
Jo-Philipp Wich 8b9e839955 base-files: uci-defaults-new: remove ucidef_set_led_interface()
The only user was the hg255d board and config_generate did not even emit
proper uci for it.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47658
9 years ago
Jo-Philipp Wich 972d3de148 base-files: config_generate: support rssi leds
Add support for emitting rssi monitor and led configuration sections.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47656
9 years ago
Jo-Philipp Wich bd4c757685 base-files: uci-defaults-new: fix storing rssi leds and triggers in board.json
Remove extra nesting of rssi leds in the led object and move rssi monitor
declaration to its own object.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47655
9 years ago
Jo-Philipp Wich 92d414eb07 base-files: config_generate: reformat for better readability and quote variables
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47654
9 years ago
Jo-Philipp Wich 1e591ee6d1 base-files: uci-defaults-new: properly quote variables
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47652
9 years ago
Jo-Philipp Wich a466bfe8f4 base-files: config_generate: handle switch port attributes and better group json_select
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47648
9 years ago
Jo-Philipp Wich 97baeb2fa4 base-files: config_generate: do not remove previously generated interfaces
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47647
9 years ago
Jo-Philipp Wich 63c2111e86 base-files: config_generate: properly handle multiple switches
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47646
9 years ago
Jo-Philipp Wich 04b8b97fff base-files: uci-defaults-new: add ucidef_add_switch_port_attr() helper
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47645
9 years ago
Jo-Philipp Wich 2f69fefc37 base-files: uci-defaults-new: whitespace cleanup
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47644
9 years ago
Jo-Philipp Wich 212feb9ccf base-files: uci-defaults-new: don't store switch attr numbers as strings
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47643
9 years ago
Jo-Philipp Wich 2d5dbf9b47 base-files: config_generate: support autogenerating vlans
Add support for generating vlans solely from the port layout description
given through ucidef_add_switch_ports().

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47639
9 years ago
Jo-Philipp Wich d6b5ce48dd base-files: add ucidef_set_interface_wan() and ucidef_add_switch_ports()
Add further helper functions to uci-defaults-new.sh for easier declarations
of complex switch layouts.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47638
9 years ago
John Crispin 18691109df base-files: show hint when JFFS2-partition is full and overlayfs mounted read-only
since r45833 and r45848 the overlayfs is automatically mounted read-only
(and blocks remounts as r/w) when JFFS2 is full. see ticket #19564

because of this normal file deletion is not possible anymore.
if a user logins interactively (e.g. SSH) show a hint for this,
that files must be removed in /overlay/upper/...

v2: fix subject line

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 47623
9 years ago
Jo-Philipp Wich 6d3901bf76 base-files: config_generate: honour port_mask property (#20963)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47609
9 years ago
Hauke Mehrtens f1894ad167 base-files: add DCCP to /etc/protocols
Fixes this conntrackd warning:
WARNING: getprotobyname() cannot find protocol `DCCP' in /etc/protocols

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

SVN-Revision: 47481
9 years ago
John Crispin 1c74d046ed base-files: create /var/tmp on boot
FHS mandates presence of /var/tmp on compliant systems.

The lack of /var/tmp was discovered when using MIT Kerberos libraries
which default to that location for storing credentials cache.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

SVN-Revision: 47219
9 years ago
Steven Barth 468c1fb320 base-files: revert to default ECN settings
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 47160
9 years ago
John Crispin ce9da6e6af base-files: add URL option for OEM manufacturer info
This URL can be embedded e.g. within UPnP announcements where a link
to the manufacturer's homepage is desired.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

SVN-Revision: 47135
9 years ago
Steven Barth d7023fc0bc base-files: sanitize and unify $PATH
Previously init and hotplug paths were different from console.

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 47080
9 years ago
Felix Fietkau b38194406f base-files: fix ramoverlay function with kernels 3.18+
Even though there are not many users left within the OpenWrt tree it seems
this function broke during the kernel 3.18 transition.

Fix it by providing a workdir as required by overlayfs.

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

SVN-Revision: 47015
9 years ago
Jo-Philipp Wich 33b3594332 base-files: refactor default_postinst()
- Simplify user spec parsing code
 - Alias IPKG_INSTROOT to shorten code
 - Quote variables where appropriate
 - Remove a useless-use-of-cat instance
 - Suppress errors in case control or list files are missing

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 46975
9 years ago
John Crispin ef2f50829d base-files: add /etc/profile.d support
OpenWrt should support an optional /etc/profile.d directory like
most other Linux distributions. This allows packages to install
their own scripts into /etc/profile.d/ directory.

The file suffix should make clear, that these scripts
are (sourced) shell-snippets. If the user needs e.g. php or lua,
one must make sure that the interpreter is called.
The reverse failsafe test makes sure, that the effective returncode is 0.

A typcal usecase is the inclusion of private helpers,
special variables or aliases, which at the moment needs
patching the sourcecode and is not well maintainable.
Now the builder can simply add there files.

v1 initial work of Hendrik Lüth <hendrik@linux-nerds.de>
v2 changes regarding RFC (e.g. thomas.langer@lantiq.com)
v3 changes regarding RFC (e.g. mschiffer@universe-factory.net)
v4 keep it simple and mimic OpenWrt style

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 46965
9 years ago
John Crispin 4ef319fad2 base-files: sysupgrade: quote source image name
get_image() eval a filename without quoting it, resulting in errors with
filenames containing characters that need to be escaped.
    $ sysupgrade -T -f ./cfg\(12\).tar.gz img.bin; echo $?
    Image check 'platform_check_image' failed.
    Invalid config file. Please use only .tar.gz files
    1
    $ mv cfg\(12\).tar.gz cfg_12.tar.gz
    $ mv img\(1\).bin img.bin
    sysupgrade -T -f ./cfg_12.tar.gz img.bin; echo $?
    0

Enclose the content of $from in double quotes.

Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>

SVN-Revision: 46919
9 years ago
Felix Fietkau 796a2d032b base-files: fix typo in core dump pattern sysctl entry (fixes #20489)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46890
9 years ago
Felix Fietkau ced2b641e2 base-files: set kernel.core_pattern in sysctl.conf
Move the pattern setting from netifd's service script to
/etc/sysctl.conf.  Put the timestamp component '%t' just after
executable name '%e' for more natural order from output of ls command.

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

SVN-Revision: 46867
9 years ago
Rafał Miłecki 56c926223e base-files: change banner to Designated Driver release
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46846
9 years ago
Steven Barth 00045fe9d0 base-files: add /etc/iproute2/rt_tables, replace ifconfig-usage
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46830
9 years ago
Steven Barth d196b1fc2e Disable telnet in favor of passwordless SSH
This enables passworldless login for root via SSH whenever no root
password is set (e.g. after reset, flashing without keeping config
or in failsafe) and removes telnet support alltogether.

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46809
9 years ago
Jonas Gorski e1824f2543 base-files: allow setting ide-disk led trigger
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46794
9 years ago
Jo-Philipp Wich 3d1890053c base-files: add /etc/hosts entries for ::1, ff02::1 and ff02::2
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 46771
9 years ago
John Crispin e83643d31c base-files: default_postinst: propagate the real postinst return code
Using the postinst script for sanity checks and expecting opkg to fail
if the postinst didn't return 0 was possible in Barrier Breaker, propagate
the real postinst return code through default_postinst to restore this
behaviour.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 46653
9 years ago
John Crispin 9b0516c9fc base-files: rework reset button script to indicate factory reset
With this change we let user know 5 seconds have passed and reset button
can be released (to trigger factory reset)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46650
9 years ago
Rafał Miłecki 567d2ab3f8 base-files: buttons: make power script return 0
It was missed in the r46471.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46582
9 years ago
John Crispin e7b34b2b0d buttons: make all button handler scripts return 0
this is required by the new button timeout feature

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

SVN-Revision: 46471
9 years ago
John Crispin cf4a0d430b base-files: fix /tmp/.jail permissions
We need a+x rights on the path to the root of the jails
so we can use users other than root (like nobody)

This partly fixes jailed dnsmasq

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>

SVN-Revision: 46466
9 years ago
John Crispin d0d3ca2a1b base-files: added option to configure the gpio led trigger in uci-defaults
Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>

SVN-Revision: 46341
9 years ago
John Crispin d65916047b base-files: implemented basic GPIO control
Internal GPIO pins are used for PoE passthrough setups in multi-port
routers. This patch implemnets control over this hardware feature for
Ubiquiti Nanostations and TP-Link CPE510.

Signed-off-by: Lars Kruse <lists@sumpfralle.de>

SVN-Revision: 46271
9 years ago
John Crispin 3787c32183 sysctl: read settings from /etc/sysctl.d/*.conf
This changes makes it possible to store custom settings
in individual files inside the directory /etc/sysctl.d/.

Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt@wertarbyte.de>

SVN-Revision: 46239
9 years ago
Felix Fietkau 908e1b4c41 base-files: add openwrt snapshot key
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45905
9 years ago
John Crispin f57076956e base-files: default_do_upgrade: accept & forward image extraction command
get_image allows passing 2nd argument that is used in a pipe for
extracting firmware from a non-native format. By accepting such command
in default_do_upgrade we allow platforms to use this helper for vendor
specific images.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45900
9 years ago
Luka Perkov 0a4bcd5be6 base-files: remove ubi tool
ubi tool was removed from fstools in r41128.

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

SVN-Revision: 45813
9 years ago
Jonas Gorski d0af85c9a5 base-files: fix default pre-/postrm for packages with a dot
Instead of stripping everything after the first dot, strip everything
after the last dot.
This fixes pre-/postrm actions for packages with a dot in their name,
like libusb-1.0.

Fixes #19668.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45702
9 years ago
Felix Fietkau 2659762e62 base-files: fix logic error in led default handling (patch from #19593)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45600
9 years ago
Felix Fietkau 2d4fa6c055 base-files: make the generic sysinfo script run earlier to allow the mount_root script to pick up the board name
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45496
9 years ago
Felix Fietkau 93fb3cac1b base-files: reorder led trigger/brightness writes
Depending on configuration, disable the LED before writing the trigger
and enable it after writing it. Fixes LEDs where the value defaults to 1

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

SVN-Revision: 45463
9 years ago
Felix Fietkau b3d699bdd3 base-files: add generic preinit script to extract board/model info from device-tree
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45462
9 years ago
John Crispin bbad3f360e modules: fix postinst generation for kernel modules
Fixes ticket #19352.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45367
9 years ago
John Crispin 5d8f9e03f1 base-files: add support for platform_pre_upgrade function
Current NAND sysupgrade process is a bit hard to follow due to the way
of triggering stage1. Currently this is done by leaving a /mark/ in the
form of /tmp/sysupgrade-nand-path during nand_do_platform_check.
Existence of this mark stops standard sysupgrade process (as the result
of sysupgrade_pre_upgrade exit). This may be a bit misleading.

Proposed solution adds a new function that will allow platform.sh
trigger NAND sysupgrade consciously. This will also allow cleaning
nand_do_platform_check limiting it to just checking the image.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 45338
9 years ago
John Crispin 4cf7929869 base-files: add a init.d option that will start the syscall tracer
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45009
9 years ago
John Crispin 5b23cfab73 base-files: create jail folder on boot
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45008
9 years ago
Felix Fietkau 889e1e4bff fstools: update to the latest version, makes interrupted first boot more reliable
Use xattr to store the filesystem initialization state of the overlay.
As long as the filesystem is not marked as initialized yet (happens in
/etc/init.d/done), all overlay data (except for sysupgrade.tgz) will be
discarded before the system is allowed to boot

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

SVN-Revision: 44942
9 years ago
Felix Fietkau bc1fc688af base-files: keep sysupgrade.tgz until /etc/init.d/done has been called
This makes interrupted boots after sysupgrade more reliable

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

SVN-Revision: 44941
9 years ago
Felix Fietkau f30358d41a kernel: remove the netfilter optimization that skips the filter table, it has caused too many issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44873
9 years ago
Luka Perkov 17610e7430 base-files: firstboot: pass down arguments such as -y to jffs2reset
This brings back old behavior.

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

SVN-Revision: 44651
9 years ago
John Crispin eea462106f uci-defaults: add ucidef_set_led_mmc
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 44446
9 years ago
John Crispin 5cd8a482f3 base-files: default_postinst() fix variable colision
The name variable contains at first the package name,
and after the last group name.
This patch fixes /etc/rc.d symlink creation (at least).

Change name in pkgname, change the other name in ugname
(user group name), and id in ugid (user group id)

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>

SVN-Revision: 44253
9 years ago
John Crispin b54f3ad6e7 base-files: fix led script to skip missing triggers
this is based on http://patchwork.ozlabs.org/patch/424451/

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

SVN-Revision: 44087
9 years ago
John Crispin 29207748b9 base-files: Use 200ms LED timing as before for the new phase preinit_regular.
This restores normal pre-r43715 200ms blink-period for the System LED we're all accustomed to see while our OpenWrt routers are booting.

Failsafe possibility will now be signalled with a new 100ms blinking, which is easily recognizable from the normal 200ms booting.

So no existing user will be scared by a new 500ms LED pattern, since such a slow pattern could easily be mistaken for something wrong... I was like "ok why my router is collapsing now, is this a bad flash, a kernel panic, or what else" when I've seen it for the first time ;)

Sorry for not having explained myself better in v1 of this patch.

Original:
Preinit, failsafe is possible: 200ms
Preinit, failsafe not possible anymore, booting normally: 200ms
Failsafe entered: 50ms

Now (after preinit_regular has been introduced):
Preinit, failsafe is possible: 200ms
Preinit, failsafe not possible anymore, booting normally: 500ms *here is the "offending" change*
Failsafe entered: 50ms

With my proposed patch:
Preinit, failsafe is possible: 100ms *indicate this condition with a new timing, that prompts the user to press the key if they want to start failsafe*
Preinit, failsafe not possible anymore, booting normally: 200ms *keep this as before*
Failsafe entered: 50ms

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>

SVN-Revision: 44056
9 years ago
John Crispin 744298b8a0 base-files: Add ucidef_set_led_timer to uci-defaults.sh
Signed-off-by: Gerald Kerma <dreagle@doukki.net>

SVN-Revision: 44000
9 years ago
John Crispin 31eadd07f2 base-files: Fix switch settings for uci-defaults-new.sh.
The enable and reset settings need to be added even when they're false. This is true at least for 'enable', that seems to default to true otherwise.

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>

SVN-Revision: 43887
9 years ago
John Crispin 019ea725aa add "preinit_regular" diag.sh set_state argument
This new argument is used right after starting regular preinit (which
happens if failsafe wasn't triggered). The main purpose of "preinit"
argument is to indicate that failsafe can be triggered, however we were
missing a way to inform user that we don't wait for a trigger anymore.
With this change it's clear when failsafe mode can be triggered.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43715
10 years ago
John Crispin f76755da3f packages: fix typo in OpenWrt name
Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>

SVN-Revision: 43542
10 years ago
John Crispin b0d2a9e77a base-files: default_postinst() - create user:group first (resend)
create user:group before running postinst-pkg. the postinst hook might require
the user:group to already exist.

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>

SVN-Revision: 43472
10 years ago
Imre Kaloz 2e3b84c3b5 fix sysupgrade on overlayfs v23+
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 43365
10 years ago
Jonas Gorski 02c6798a0d base-files: supress errors from ldd
ldd might be called for shell scrips during sysupgrade, causing it to
complain that they are not a dynamic executables.

This is a harmless error, so supress it to avoid confusing about them
being serious ones.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 43315
10 years ago
Jonas Gorski 2e95b1fda7 base-files: properly fix copying ld*.so with eglibc
r36107 ("base-files: sysupgrade fail with eglibc") tried to fix
sysupgrade by changing the ld-soname to what is expected, but only
fixed MIPS while breaking ARM.

The underlying issue is that the ld.so name varies widely across
different architectures for eglibc:

eglibc-2.19-r25243$ grep -r "ld-soname :=" . | awk '{ print $3 }' | sort -u
ld64.so.1
ld64.so.2
ld-linux-aarch64_be.so.1
ld-linux-aarch64.so.1
ld-linux-armhf.so.3
ld-linux-mipsn8.so.1
ld-linux.so.2
ld-linux.so.3
ld-linux-x32.so.2
ld-linux-x86-64.so.2
ld.so.1

Instead of adding each different soname to check for and copy it,
replace the awk script with a sed script to extract it properly and
drop the hardcoded so-name.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 43295
10 years ago
John Crispin 5a6433cc6c base-files: config_generate did not handle setups with more than 1 switch properly
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43088
10 years ago
Felix Fietkau 7a5002ec9d base-files: add /etc/shadow to list of essential files to keep in sysupgrade (bug 18206)
Based on bug #18206 sysupgrade can lead to loss of password information in
certain situations. Most likely all users who will upgrade from versions
r43017-43040, will lose their current passwords. :-(
https://dev.openwrt.org/ticket/18206

Currently /etc/shadow is defined as a conffile in base-files:
https://dev.openwrt.org/browser/trunk/package/base-files/Makefile#L37

But it is not defined in the default list of essential files to keep in
sysupgrade:
https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/upgrade/keep.d/base-files-essential

If exporting conffiles info fails, /etc/shadow can get lost.

Shadow passwords are now the default, so saying that preserving /etc/passwd
is essential while /etc/shadow is not, makes no sense.

The attached patch adds /etc/shadow to the list of essential files.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>

SVN-Revision: 43061
10 years ago
Felix Fietkau 99a651fd50 base-files: fix telnet login on musl
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43006
10 years ago
John Crispin 829bf6b9a1 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.

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
10 years ago
Felix Fietkau 0ef474a118 base-files: fix ldd definition if /usr/bin/ldd exists
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42976
10 years ago
John Crispin 666659fb31 default_postinst() fix wrong call of group_add
[base-files] default_postinst() fix wrong call of group_add
after 12bae65d07d29854204715cebc1ef1eae237fd9b group_add is
always called. shell scripting can be tricky...

wrong call:
[ -n "$gid" ] && group_exists $name || group_add $name $gid

this leads to a call of 'group_add' when $gid is emtpy, proof:

root@box:~ functionA() { echo A; }
root@box:~ functionB() { echo B; }
root@box:~ VAR=
root@box:~ [ -n "$VAR" ] && functionA || functionB
B
root@box:~ # functionB was called, but VAR is not filled
root@box:~ VAR=filled
root@box:~ [ -n "$VAR" ] && functionA || functionB
A

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 42926
10 years ago
John Crispin d099a34980 base-files: default_postinst() force clear luci-indexcache
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
10 years ago
John Crispin 5efe2e5e3c base-files: the USERID code path did not check for duplicate groups
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42919
10 years ago
John Crispin 20940138ac scripts: fix wrong usage of '==' operator
[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
10 years ago
Steven Barth 14e6559eee base-files: add network_get_ipaddrs_all()
Return all IPv4 and IPv6 addresses.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 42856
10 years ago
Steven Barth c118e5edf4 network: Unbind DHCPv6 from underlying interfaces
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
10 years ago
John Crispin a3bf98495a base-files: extend USERID:=syntax
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
10 years ago
John Crispin f9cccd2c14 base-files: make postinst script run inside a subshell
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42800
10 years ago
John Crispin 7860c9707a sysupgrade: preserve symlinks in backups
Signed-off-by: Catalin Patulea <catalinp@google.com>

SVN-Revision: 42783
10 years ago
Steven Barth 8a971b2770 base-files: remove a 'not found' error message during system boot
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
10 years ago
Florian Fainelli bc96c49c67 base-files: add a protocol argument to ucidef_set_interface_raw
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
10 years ago
John Crispin 44249f71a8 postinst trigger: the new postinst trigger broke IB
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42571
10 years ago
Luka Perkov a8b6ca8797 base-files: whitespace fixes
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 42542
10 years ago
John Crispin d6dbc22bbc ipkg: add a default postinst/prerm script
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
10 years ago