Commit Graph

371 Commits

Author SHA1 Message Date
William Hubbs
e8e86b96dc fix issue with extra_net_fs_list
The extra_net_fs_list variable was not being included as it should have
been for the net file systems because it was being expanded before it
was set by the user.

X-Gentoo-Bug: 374133
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=374133
2011-07-05 18:41:33 -05:00
Mike Frysinger
49f1a8702b eat trailing whitespace
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-04 18:27:00 -04:00
Robin H. Johnson
be990b308a Bug 373808: init.d/modules skipped certain variable combinations
The version iteration code missed certain combinations:
KV=1.2.3.4
skips: 1.2.3, 1
KV=1.2.3
skips: 1

Simplify the code to use a loop and build the list of versions directly
instead of unique variables per version component.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-07-04 07:48:51 +00:00
Mike Frysinger
d0bc4f20ad drop useless "All rights reserved" notice
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
Kirill Elagin
2050e67911 localmount: make OIFS and CIFS local in stop function
X-Gentoo-Bug: 371141
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=371141
2011-06-24 12:13:28 -05:00
William Hubbs
013e7fb9fc allow options to be passed to killall5
This allows options to be passed to killall5 by the killprocs script.
This was added so that certain processes will not be killed during
shutdown.

x-Gentoo-Bug: 371625
x-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=371625
2011-06-23 21:52:44 -05:00
Mike Frysinger
8947c00204 sysctl: do not make unknown keys fatal
If unknown keys are found, currently sysctl would add all of its valid
settings, but then leave itself marked as "stopped".  Since this is not
really what we want, make unknown keys a non-fatal error.

Reported-by: Christian Ruppert <idl0r@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 10:06:41 -05:00
Diego Elio Pettenò
a2c8e5ce50 Don't set hostname on containers.
LXC already provides a means to set the utsname/hostname of the system, so
avoid overriding the user's configuration through hostname here.

Signed-off-by: Diego Elio Pettenò <flameeyes@gmail.com>
2011-06-02 11:34:13 -05:00
William Hubbs
8202e7dce4 add back the eend command in start/stop for local service
This was added back due to a user request. It will always be on a line
of its ownbecause I'm considering adding more verbose info messages to
local that show when each service is run if local is run with the -v
option.

X-Gentoo-Bug: 363343
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=363343
2011-04-21 13:02:49 -05:00
Lars Wendler
ede4d1cd60 Don't unmount /run on shutdown
This is needed so that udev will stop properly on shutdown.

X-Gentoo-Bug: 363971
X-Gentoo-Bug-Url: http://bugs.gentoo.org/show_bug.cgi?id=363971
2011-04-18 15:26:19 -05:00
Anthony G. Basile
ac56ab7f6d Check for /sys/module/usbcore before modprobe usbcore
The use of /proc/bus/usb to mount usbfs has been deprecated, but
the option is still available in the kernel.  The new approach is
to use /sys.  We should not modprobe usbcore if either /proc/bus/usb
or /sys/module/usbcore exist.

X-Gentoo-Bug: 363551
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=363551
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2011-04-17 09:12:20 -04:00
William Hubbs
de0ded4ed0 revert changes for bug #292894
This is being done because these dependency changes caused a regression.
We will need to revisit the previously mentioned bug.

X-Gentoo-Bug: 363693
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=363693
2011-04-15 19:21:20 -05:00
Sebastian Thorarensen
75722dac4e termencoding should run after bootmisc
This change is necessary so that the unicode flag is not erased by
bootmisc.

X-Gentoo-Bug: 363611
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=363611
2011-04-14 15:21:02 -05:00
William Hubbs
03cd55aa19 start loopback interface before mtab
X-Gentoo-Bug: 292894
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=292894
2011-04-11 15:33:41 -05:00
William Hubbs
85827d474c remove "after bootmisc" dependency from loopback interface 2011-04-10 17:24:44 -05:00
William Hubbs
8e925368b7 bring up the loopback interface earlier
For most situations, the loopback interface can depend on root instead
of localmount, so this patch makes that happen. It also adds comments to
the net.example files explaining when a user might want to change this
and giving an example.

I would like to thank Robin Johnson for the original patch and suggested
examples.

X-Gentoo-Bug: 292894
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=292894

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-04-10 16:10:47 -05:00
William Hubbs
15660dbbfc add fallback_routes support to network scripts
Add support for optional fallback_routes_* variables in the network scripts.
This is similar to the fallback_route_* support in baselayout-1.
However, if you do not have fallback_routes set for an interface but you
do have routes set, that setting will be used, so you do not need this
variable unless you want the fallback routes to be different from the
primary routes.

X-Gentoo-Bug: 250978
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=250978
2011-04-09 13:54:01 -05:00
William Hubbs
c7c278dfd4 do not timeout waiting for bootmisc to complete
It is possible for bootmisc to take longer than 60 seconds to complete
and services should not time out waiting for it.

X-Gentoo-Bug: 360405
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=360405
2011-04-08 14:01:13 -05:00
William Hubbs
46e67badd2 fix typo in staticroute
X-Gentoo-Bug: 362205
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=362205
2011-04-07 07:19:53 -05:00
Mike Frysinger
7c1a2defb6 bootmisc: clean up tmpdir cleaning
Make sure that the `cd` into the $dir actually happened.  This we don't
have to worry about relative paths deleting stuff it shouldn't.  This
step shouldn't fail, but who knows, and better to be sane than to wipe
out someone's valuables.

When wiping, automatically fall back to a dedicated `find` if the initial
`rm` failed on us.  This should help with the speed issues related to the
later `find`.

Have the later find only search the top level allowing `rm` to walk the
directory contents.  This means that -xdev no longer applies, but since
the earlier `rm` wasn't doing -xdev either and no one has complained thus
far, let's assume it isn't an issue.  Also convert to the -exec...+ form
so that we don't have to worry about long argument lists, and add -- to
the `rm` that was previously missing.  In practice, this shouldn't matter
as we've already deleted all those files, but better safe than sorry.

When cleaning, since we've already done a `cd` into the $dir, no point in
prefixing all the paths with $dir too.  Go with the relative loving.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
X-Gentoo-Bug: 359831
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=359831
2011-03-25 11:25:25 -05:00
William Hubbs
25049d3e80 termencoding needs root to be mounted read/write
X-Gentoo-Bug: 360215
X-Gentoo-Bug-URL: http://bugs.gentoo.org/360215
2011-03-23 22:41:03 -05:00
Ed Wildgoose
60d8d4f5bb do not delete addresses when stopping a ppp interface.
This is important in situations where ppp is being used in a demand
dialing setup.

X-Gentoo-Bug: 359069
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=359069
2011-03-21 23:55:55 -05:00
William Hubbs
87302487d2 savecache should not fail if we are shutting down
Since mount-ro needs to run unconditionally, we need to have savecache
report that it ran successfully when the system is shutting down.

X-Gentoo-Bug: 356393
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=356393
2011-03-06 11:50:06 -06:00
Sebastian Thorarensen
bae0a693a9 Set unicode mode immediately at boot without consolefont
X-Gentoo-Bug: 354793
X-Gentoo-Bug-URL: http://bugs.gentoo.org/354793
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2011-02-14 18:54:35 -05:00
Mike Frysinger
35d38c3561 local: quote script names to handle spaces
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-14 12:06:58 -05:00
Mike Frysinger
11fcb0217e hwclock: fix typo from an earlier style commit
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-14 12:06:58 -05:00
Anthony G. Basile
c8b5078660 Fix bug #354805 2011-02-14 04:41:08 -05:00
William Hubbs
ebd79394a3 set timezone if RC_HCTOSYS is not set
We need to set the timezone for the system clock even when we allow the
kernel to set the time.

X-Gentoo-Bug: 248131
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=248131
2011-02-09 23:15:24 -06:00
William Hubbs
19037cbd83 remove unnecessary shell calls
The main makefile, init.d/Makefile and src/librc/Makefile all contain
several shell calls which can be handled as make conditionals. This
switches them to conditionals.
2011-02-04 17:46:57 -06:00
William Hubbs
cca7e9f7e1 use immediate evaluation for shell calls
This reworks the shell calls in the makefiles to use immediate
evaluation and should improve parallel building.

X-Gentoo-Bug: 289264
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=289264
2011-01-31 14:05:57 -06:00
William Hubbs
fa1fefb2bc add option to disable setting the system clock on boot for linux systems
This commit adds the clock_hctosys option which is used to skip setting
the system clock on boot and can be used with a modern linux kernel
which has the CONFIG_RTC_HCTOSYS option set to y.
I would like to thank Dimitris Mandalidis for the report and for the
patch to baselayout-1 on which my changes to openrc are based.

X-Gentoo-Bug: 248131
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=248131
2011-01-24 21:37:51 -06:00
William Hubbs
10ce67886d change local to run programs
This changes the local service so that it will run programs located in
@sysconfdir@/local.d instead of the local_start and local_stop functions
from @sysconfdir@/conf.d/local.

The advantage for the user is that these programs are not part
of the openrc package, so the user does not have to worry about them
being overwritten when openrc is upgraded.

X-Gentoo-Bug: 351465
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=351465
2011-01-20 12:50:29 -06:00
Mike Frysinger
faa2df1159 more whitespace cleanup
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:49:12 -05:00
Chris Richards
92b6262ac7 Bug 349571 - SELinux fixes for bootmisc
- delete the contents of the $RC_LIBEXECDIR/console directory but not
  the directory itself.
  - direct error output from the chmod call for /tmp to /dev/null.
2011-01-06 18:20:53 -06:00
William Hubbs
b2e9b91852 bug #349443: remove -openvz keyword from sysctl service
Openvz supports sysctl settings which are different from the host
settings, so allow the sysctl service to run for openvz systems.
2010-12-28 13:54:19 -06:00
Robin H. Johnson
7f7baa6c3c Bug #266659: we really need to allow peer, pointtopoint in parsing config lines. 2010-12-11 18:29:34 -08:00
Robin H. Johnson
e431599d08 Add "after lvm modules" as Flameeyes reports that LVM is starting too late on his system in some cases. 2010-12-11 14:25:46 -08:00
William Hubbs
84750f5722 bug 232347: fix netmount to respect _netdev option
The _netdev option in fstab on linux systems indicates
that a filesystem should only be mounted if the network is available.

This commit fixes netmount to support this.
2010-12-07 11:54:03 -06:00
William Hubbs
cdf07b5970 localmount should only use the -O option for linux systems
This fixes bug #347307.
2010-11-30 15:40:44 -06:00
William Hubbs
82b265016a send error output from chattr command to /dev/null
This is for bug #346659.
2010-11-26 14:54:30 -06:00
William Hubbs
9e5b9abf40 remove "use hostname" from sysctl for bsd systems 2010-11-16 10:03:05 -06:00
William Hubbs
ac37dc2764 do not mount local file systems with the _netdev option in fstab
This fixes #344947.
2010-11-15 12:01:48 -06:00
William Hubbs
6d9137d6c4 remove support for local.start and local.stop for bug #343709
The openrc ebuild now migrates these files to /etc/conf.d/local, so we
do not need to support them.
2010-11-10 10:55:28 -06:00
William Hubbs
2fa6bb0d48 add warnings about local.start and local.stop for bug #343709
We need to warn users that they should be using /etc/conf.d/local
instead of /etc/conf.d/local.start and /etc/conf.d/local.stop. This adds
those warnings.
2010-11-05 13:42:33 -05:00
Diego Elio Pettenò
09bed967bf Allow cleaning up of pam_mktemp-based temporary directories.
This was blacklisted before, so the .private directories never had their
content cleaned up, even if WIPE_TMP was set to yes.
2010-10-31 16:18:38 -05:00
Jory A. Pratt
7653ef89b8 remove 'use hostname' bug 340991, Thanks Diego 2010-10-23 23:52:43 -05:00
Jory A. Pratt
14c95ae9a6 update consolefont/keymap to include -lxc in keywords 2010-08-10 08:21:08 -05:00
William Hubbs
d3ccbdb5a9 allow ip to be in /sbin or /bin
This makes it possible for the "ip" program in iproute2 to be installed
in /sbin or /bin.
2010-08-09 20:01:15 -05:00
William Hubbs
6f24d1cbd8 fix typo
I made a typo while manually transferring over Roy's last commit.  This
fixes that typo.
2010-07-10 15:31:16 -05:00
William Hubbs
6850566be0 remove extra route
This was taken from Roy Marples' git repository.
2010-07-07 19:42:56 -05:00
Roy Marples
67b538fd26 Fix tentative ip addresses 2010-03-24 20:25:42 +00:00
Roy Marples
0276c4f516 Release openrc-0.6.1 2010-03-22 20:02:12 +00:00
Mike Frysinger
ecf9ef49a7 random spelling fixes
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-08 22:02:51 +00:00
William Hubbs
2c0a71172d default route commands on Linux now require gw or via (iproute2). 2009-12-19 08:03:35 +00:00
Roy Marples
a165fbe384 Support inet6 routes. 2009-12-14 19:31:18 +00:00
Roy Marples
02c12c1cac Allow "dev eth0" to work for a default route. 2009-12-14 19:01:03 +00:00
Roy Marples
084f5e12eb Fix restart with iproute2 2009-12-14 14:21:30 +00:00
Roy Marples
3b9eaea8ec Don't add broadcast addresss to ipv6 2009-12-14 10:14:39 +00:00
Roy Marples
9476a2e721 Typo 2009-12-11 09:26:43 +00:00
Roy Marples
1d174cc60c Move on_ac_power to a shell script.
Fixes #204
2009-12-10 22:30:56 +00:00
William Hubbs
12af86395f Allow ip to add the default route.
Fixes #211.
2009-12-10 22:08:51 +00:00
Roy Marples
775d56b877 Document multiple routes, fixes #210. 2009-12-05 21:23:39 +00:00
Roy Marples
22e2a4f0a1 Add support for iproute2 in staticroute.
Fixes #208.
2009-12-05 20:05:43 +00:00
Roy Marples
89a2d76772 Rework around new kbd-1.15.1, Gentoo #289265. 2009-11-13 22:21:50 +00:00
Roy Marples
80d4ce3a11 Add a --warn option to just warn when reference file does not exist.
Fixes Gentoo #291894.
2009-11-13 21:31:09 +00:00
Roy Marples
d21177e5c7 Ensure we have a valid broadcast address. 2009-11-11 00:31:32 +00:00
Roy Marples
d29daf3952 fsck only checks battery when requested, which is not by default.
This fixes having JFS as the root partition on battery power.
For most modern FS's this is a non op, or a very small op by default
so it should be fine.
Fixes Gentoo #291654.
2009-11-10 22:50:48 +00:00
Roy Marples
1d9ce8e9a1 Allow sysctl to read confs from /etc/sysctl.d
Fixes #203.
2009-11-10 22:40:35 +00:00
William Hubbs
bb96dc4e01 Fix iproute2 support.
Fixes Gentoo #289762.
2009-11-10 21:19:17 +00:00
Jan Psota
ebb49805fc Don't punt /var/log/wtmp if it exists, just create if it does not.
Fixes Gentoo #289849.
2009-11-10 20:09:44 +00:00
Roy Marples
95ee39ab1c Add support for Linux Containers, fixes #202.
Patch by bug reporter.
2009-11-04 19:21:24 +00:00
Roy Marples
3c8ea5896a Fix default domain 2009-10-25 00:03:20 +01:00
Roy Marples
d27655c908 Add domainname to the network script 2009-10-16 12:04:20 +01:00
Roy Marples
baeb59cd2e Add a new staticroute init script so that .... static routes can be configured!
Fixes Gentoo #288421.
2009-10-16 08:08:22 +01:00
Roy Marples
da08e3822f Ensure ip brings interface up when adding addresses.
Fixes Gentoo #288889
2009-10-15 20:17:51 +01:00
Roy Marples
ac7af85813 Provide clock 2009-10-13 21:06:35 +01:00
Roy Marples
a8f6a9b654 Add new utility and init script swclock that sets the system time based on
the mtime of a file. It saves the shutdown time to this file also.
This is handy for systems without a working RTC chip.
Based on an idea by Michael A. Smith <michael@smith-li.com>.
Fixes Gentoo #272073.
2009-10-13 08:03:45 +01:00
Semen Maryasin
aaa0498bf8 EeePC 901 has /proc/acpi/ac_adapter/AC0, so check all AC entries. 2009-10-12 08:21:50 +01:00
Roy Marples
51907c7368 If there is an error setting the font, abort instead of trying to set
the font for subsequent consoles.
2009-08-19 16:49:35 +01:00
Roy Marples
29949a5496 If mtab is write only and a symlink then assume it's linked to /proc/mounts
and don't try and update it. Fixes #185.
2009-07-20 19:47:08 +01:00
Roy Marples
08b5664668 Only delete /etc/nologin if we can write to it 2009-07-09 13:32:27 +01:00
Roy Marples
9907c90552 Host should configure urandom.
Fixes #179.
2009-07-01 00:13:25 +01:00
Roy Marples
b4104957b1 We should use -feature instead of nofeature.
This matches the ifconfig and Gentoo USE flag syntax and is hopefully
easier to read.
Fixes #178.
2009-07-01 00:07:32 +01:00
Roy Marples
fbb78022f9 Ensure that tmp dirs are +rw as well as +t. 2009-06-13 21:12:50 +01:00
Natanael Copa
79b24f5b79 hwclock now sends help to stderr. 2009-06-12 23:11:16 +01:00
Roy Marples
fc6cdefedb Linux FHS requires /var/lib/misc
Stop fuser from being chatty
2009-06-08 22:18:39 +01:00
Roy Marples
c568baf8c8 Ignore more foo 2009-06-05 09:20:10 +01:00
Roy Marples
aaced3face Update copyright 2009-06-05 09:20:10 +01:00
Roy Marples
278e65b24a Ignore termencoding 2009-05-29 22:09:39 +01:00
Roy Marples
1b3a413673 Skip sysctl errors 2009-05-29 22:08:47 +01:00
Roy Marples
a685e4db0a Add FreeBSD support for AC power. 2009-05-29 21:33:44 +01:00
Roy Marples
e689f17933 Support NetBSD envstat for working out if on AC power. 2009-05-29 21:19:31 +01:00
Roy Marples
fa9e482a31 If not running on AC power don't run fsck to preserve battery life. 2009-05-29 21:06:59 +01:00
Roy Marples
60134ddec5 Only delete addresses for interfaces that exist. 2009-05-29 15:23:23 +01:00
Roy Marples
c0fd1b49e4 Move non compiled libraries from /lib/rc to /libexec/rc
OpenRC version is now stored as plaintext in /libexec/rc/version

Plugins (cursplash, splashutils) will have to be re-compiled to pickup
the new directories. State data needs to be moved from /lib/rc/init.d
to /libexec/rc/init.d as well.
2009-05-23 20:38:12 +01:00
Roy Marples
701813b5ff procfs should use modules. 2009-05-11 15:31:52 +01:00
Roy Marples
d441bf1585 Ignore more foo for the BSDs 2009-05-05 10:29:52 +01:00
Roy Marples
658a220638 Add (c) to Copyright 2009-05-01 15:11:40 +01:00
Roy Marples
b32c9c1139 Ensure that rc.d services are not started twice if PKG_DIR is blank.
Fixes #170
2009-05-01 09:37:51 +01:00
Roy Marples
b70501ef45 Go back to git 2009-04-30 15:05:39 +01:00