aboutsummaryrefslogtreecommitdiff
path: root/sh
Commit message (Collapse)AuthorAgeFilesLines
* Remove absolute paths from commandsMike Gilbert2023-09-101-2/+2
| | | | | | | Bug: https://bugs.gentoo.org/889922 Bug: https://bugs.gentoo.org/893290 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* functions.sh: Fix non-netns case for ip commandPatrick McLean2021-03-241-1/+1
| | | | | | | | Attempt to wrap ip commands with a netns would fail sometimes when there is no netns defined. This fixes to not use the variable when it is not needed. Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
* net/iproute2.sh: Add initial support for network namespacesPatrick McLean2021-03-111-0/+41
| | | | | | | | | | | | | | | | | | This adds initial support for network namespaces. An interface can be assigned to a network namespace with `netns_${IFACE}`. The script will move the interface to the namespace if it is not already there. This adds a helper functions to `functions.sh` called `_netns`, this function facilitates scripts working withing network namespaces. It allows eching to sysfs etc files, globbing, and arbitrary commands within a network namespace. This uses a wrapper for the `ip` command so all calls to it will add `-n ${netns}` so it's operating in the netns. Basic interface configuration is tested and working. Signed-off-by: Patrick McLean <chutzpah@gentoo.org> Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
* sh/udhcpc-hook.sh: shellcheck fixesRobin H. Johnson2019-04-201-3/+4
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Add shellcheck toolingRobin H. Johnson2019-04-205-0/+5
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* sh/functions.sh: Avoid bashisms in shell_var()Martin Väth2019-04-201-1/+9
| | | | | | | POSIX shells do not provide a substitution operation ${..//..} Negated character classes are marked by [!..] and not [^..] in POSIX. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Switch /var/run to /run.Robin H. Johnson2016-10-241-2/+2
| | | | | | | | | Use /run directly, instead of /var/run, for starting any internal daemons. This allows netifrc to earlier, before /var is available. X-Gentoo-Bug: 545364 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545364 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* sh/udhcpc-hook.sh: classless static routesRobin H. Johnson2016-10-241-1/+25
| | | | | | | | | | Support RFC3442 (DHCP classless static routes). Thanks to Jack Suter <gentoo-bugs@suter.io>. X-Gentoo-Bug: 524156 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=524156 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* gitignore: systemd-wrapper.sh is built.Robin H. Johnson2016-07-141-0/+1
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Merge pull request #8 from casta/masterRobin H. Johnson2015-01-191-3/+6
|\ | | | | fix https://bugs.gentoo.org/show_bug.cgi?id=536758
| * fix https://bugs.gentoo.org/show_bug.cgi?id=536758Guillaume Castagnino2015-01-161-3/+6
| | | | | | | | The shill version of shell_var is not correctly escaping vars
* | Merge pull request #6 from floppym/fixes1Robin H. Johnson2015-01-192-7/+6
|\ \ | | | | | | Miscellaneous fixes
| * | Do not call exit with a negative valueMike Gilbert2015-01-152-7/+6
| |/ | | | | | | This is undefined in POSIX.
* | Speed up testing for e* commands.Robin H. Johnson2015-01-161-2/+3
| | | | | | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* | functions.sh: fix check for OpenRCDoug Freed2015-01-151-1/+1
|/ | | | | | | Fix the check for OpenRC so that it actually matches whether it's running under OpenRC. Reported-By: Patrick McLean <chutzpah@gentoo.org>
* Update Makefiles to reflect changesRabi Shanker Guha2015-01-091-4/+4
|
* Systemd Wrapper: to be called from unit fileRabi Shanker Guha2015-01-091-0/+91
|
* Compatibility layer for multiple init systemsRabi Shanker Guha2015-01-091-0/+126
|
* initial commit ported from OpenRcWilliam Hubbs2013-04-065-0/+151