public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2011-06-24  2:58 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2011-06-24  2:58 UTC (permalink / raw
  To: gentoo-commits

commit:     013e7fb9fc08acd33e944659ff8e7a18aee2b69f
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 24 02:52:44 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jun 24 02:52:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=013e7fb9

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

---
 conf.d/Makefile.Linux |    2 +-
 conf.d/killprocs      |    3 +++
 init.d/killprocs.in   |    4 ++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/conf.d/Makefile.Linux b/conf.d/Makefile.Linux
index 37745de..369b3df 100644
--- a/conf.d/Makefile.Linux
+++ b/conf.d/Makefile.Linux
@@ -1,2 +1,2 @@
-CONF+=	consolefont dmesg hwclock keymaps modules
+CONF+=	consolefont dmesg hwclock keymaps killprocs modules
 SOS=	Linux

diff --git a/conf.d/killprocs b/conf.d/killprocs
new file mode 100644
index 0000000..0cf10d0
--- /dev/null
+++ b/conf.d/killprocs
@@ -0,0 +1,3 @@
+# If you wish to pass any options to killall5 during shutdown,
+# you should do so here.
+killall5_opts=""

diff --git a/init.d/killprocs.in b/init.d/killprocs.in
index 7132e9e..2d398d2 100644
--- a/init.d/killprocs.in
+++ b/init.d/killprocs.in
@@ -12,11 +12,11 @@ depend()
 start()
 {
 	ebegin "Terminating remaining processes"
-	killall5 -15
+	killall5 -15 ${killall5_opts}
 	sleep 1
 	eend 0
 	ebegin "Killing remaining processes"
-	killall5 -9
+	killall5 -9 ${killall5_opts}
 	sleep 1
 	eend 0
 }



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2011-07-04  7:52 Robin H. Johnson
  0 siblings, 0 replies; 18+ messages in thread
From: Robin H. Johnson @ 2011-07-04  7:52 UTC (permalink / raw
  To: gentoo-commits

commit:     be990b308ae2e7a725852f22f285267dcfeeaa2a
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  4 07:48:51 2011 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Jul  4 07:48:51 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=be990b30

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 <AT> gentoo.org>

---
 conf.d/modules    |   10 +++++++---
 init.d/modules.in |   28 ++++++++++++++--------------
 2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/conf.d/modules b/conf.d/modules
index c5a3627..a062a62 100644
--- a/conf.d/modules
+++ b/conf.d/modules
@@ -1,8 +1,10 @@
 # You can define a list modules for a specific kernel version,
 # a released kernel version, a main kernel version or just a list.
+# The most specific versioned variable will take precedence.
 #modules_2_6_23_gentoo_r5="ieee1394 ohci1394"
 #modules_2_6_23="tun ieee1394"
 #modules_2_6="tun"
+#modules_2="ipv6"
 #modules="ohci1394"
 
 # You can give modules a different name when they load - the new name
@@ -10,10 +12,12 @@
 #modules="dummy:dummy1"
 
 # Give the modules some arguments if needed, per version if necessary.
+# Again, the most specific versioned variable will take precedence.
 #module_ieee1394_args="debug"
-#module_ieee1394_args_2_6_23_gentoo_r5="ieee1394 ohci1394"
-#module_ieee1394_args_2_6_23="tun ieee1394"
-#module_ieee1394_args_2_6="tun"
+#module_ieee1394_args_2_6_23_gentoo_r5="debug2"
+#module_ieee1394_args_2_6_23="debug3"
+#module_ieee1394_args_2_6="debug4"
+#module_ieee1394_args_2="debug5"
 
 # You should consult your kernel documentation and configuration
 # for a list of modules and their options.

diff --git a/init.d/modules.in b/init.d/modules.in
index ee4fdab..631e2e5 100644
--- a/init.d/modules.in
+++ b/init.d/modules.in
@@ -16,18 +16,21 @@ start()
 	# support compiled in ...
 	[ ! -f /proc/modules ] && return 0
 
-	local KV=$(uname -r)
-	local KV_MAJOR=${KV%%.*}
-	local x=${KV#*.}
-	local KV_MINOR=${x%%.*}
-	x=${KV#*.*.}
-	local KV_MICRO=${x%%-*}
+	local KV x y kv_variant_list
+	KV=$(uname -r)
+	# full $KV
+	kv_variant_list="${KV}"
+	# remove any KV_EXTRA options to just get the full version
+	x=${KV%%-*}
+	# now slowly strip them
+	while [ -n "$x" ] && [ "$x" != "$y" ]; do 
+		kv_variant_list="${kv_variant_list} $x"
+		y=$x
+		x=${x%.*}
+	done 
 
 	local list= x= xx= y= args= mpargs= cnt=0 a=
-	for x in "$KV" \
-		$KV_MAJOR.$KV_MINOR.$KV_MICRO \
-		$KV_MAJOR.$KV_MINOR \
-	; do
+	for x in $kv_variant_list ; do
 		eval list=\$modules_$(shell_var "$x")
 		[ -n "$list" ] && break
 	done
@@ -45,10 +48,7 @@ start()
 		fi
 		aa=$(shell_var "$a")
 		xx=$(shell_var "$x")
-		for y in "$KV" \
-			$KV_MAJOR.$KV_MINOR.$KV_MICRO \
-			$KV_MAJOR.$KV_MINOR \
-		; do
+		for y in $kv_variant_list ; do
 			eval args=\$module_${aa}_args_$(shell_var "$y")
 			[ -n "${args}" ] && break
 			eval args=\$module_${xx}_args_$(shell_var "$y")



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2011-09-27 16:16 Christian Ruppert
  0 siblings, 0 replies; 18+ messages in thread
From: Christian Ruppert @ 2011-09-27 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     c5fb64d61f1462d0f8790838424722e161ba4024
Author:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 27 16:15:08 2011 +0000
Commit:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Tue Sep 27 16:15:08 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=c5fb64d6

Make dmesg log optional

Reported-by: Patrick <gentoo <AT> feystorm.net>
X-Gentoo-Bug: 384485
X-Gentoo-Bug-URL: https://bugs.gentoo.org/384485

---
 conf.d/bootmisc    |    4 ++++
 init.d/bootmisc.in |   13 ++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/conf.d/bootmisc b/conf.d/bootmisc
index 2c1670b..d79706c 100644
--- a/conf.d/bootmisc
+++ b/conf.d/bootmisc
@@ -4,3 +4,7 @@ clean_tmp_dirs="/tmp"
 # Should we wipe the tmp paths completely or just selectively remove known
 # locks / files / etc... ?
 wipe_tmp="YES"
+
+# Write the initial dmesg log into /var/log/dmesg after boot
+# This may be useful if you need the kernel boot log afterwards
+log_dmesg="YES"

diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index 6607f45..2ca7926 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -16,6 +16,7 @@ dir_writeable()
 }
 
 : ${wipe_tmp:=${WIPE_TMP:-yes}}
+: ${log_dmesg:=${LOG_DMESG:-yes}}
 
 cleanup_tmp_dir()
 {
@@ -142,11 +143,13 @@ start()
 		fi
 	fi
 
-	if $logw || dir_writeable /var/log; then
-		# Create an 'after-boot' dmesg log
-		if [ "$RC_SYS" != VSERVER -a "$RC_SYS" != OPENVZ ]; then
-			dmesg > /var/log/dmesg
-			chmod 640 /var/log/dmesg
+	if yesno $log_dmesg; then
+		if $logw || dir_writeable /var/log; then
+			# Create an 'after-boot' dmesg log
+			if [ "$RC_SYS" != VSERVER -a "$RC_SYS" != OPENVZ ]; then
+				dmesg > /var/log/dmesg
+				chmod 640 /var/log/dmesg
+			fi
 		fi
 	fi
 



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2011-11-06 20:04 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2011-11-06 20:04 UTC (permalink / raw
  To: gentoo-commits

commit:     e3b39a677b535bc2676a939519906f6b2dbce6f4
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  6 19:58:48 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Nov  6 19:58:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=e3b39a67

fsck: add the ability to specify mount points to check

---
 conf.d/fsck    |    7 +++++++
 init.d/fsck.in |   13 ++++++++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/conf.d/fsck b/conf.d/fsck
index 5d42c9d..16aa575 100644
--- a/conf.d/fsck
+++ b/conf.d/fsck
@@ -13,6 +13,13 @@
 #fsck_passno=">1"
 #fsck_passno="<2"
 
+# If passno is not enough granularity, you can also specify mountpoints to
+# check. This should NOT be used for the default non-multiplexed fsck, or your
+# system might not be checked. Additionally, it is mutually exclusive with
+# the fsck_passno setting.
+#fsck_mnt=""
+#fsck_mnt="/home"
+
 # Most modern fs's don't require a full fsck on boot, but for those that do
 # it may be advisable to skip this when running on battery.
 # WARNING: Do not turn this off if you have any JFS partitions.

diff --git a/init.d/fsck.in b/init.d/fsck.in
index 54537f6..03b2939 100644
--- a/init.d/fsck.in
+++ b/init.d/fsck.in
@@ -48,8 +48,13 @@ start()
 
 	if [ -n "$fsck_passno" ]; then
 		check_extra="[passno $fsck_passno] $check_extra"
+		if -n "$fsck_mnt" ]; then
+			eerror "Only 1 of fsck_passno and fsck_mnt must be set!"
+			return 1
+		fi
 	fi
 	ebegin "Checking local filesystems $check_extra"
+	# Append passno mounts
 	for p in $fsck_passno; do
 		local IFS="$_IFS"
 		case "$p" in
@@ -58,10 +63,16 @@ start()
 		set -- "$@" $(fstabinfo --passno "$p")
 		unset IFS
 	done
+	# Append custom mounts
+	for m in $fsck_mnt ; do
+		local IFS="$_IFS"
+		set -- "$@" "$m"
+		unset IFS
+	done
 
 	if [ "$RC_UNAME" = Linux ]; then
 		fsck_opts="$fsck_opts -C0 -T"
-		if [ -z "$fsck_passno" ]; then
+		if [ -z "$fsck_passno" -a -z "$fsck_mnt" ]; then
 			fsck_args=${fsck_args--A -p}
 			if echo 2>/dev/null >/.test.$$; then
 				rm -f /.test.$$



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2011-11-07  4:07 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2011-11-07  4:07 UTC (permalink / raw
  To: gentoo-commits

commit:     5a3599df8a15b1212857335101c9d31fb19e87e2
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  7 04:06:58 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Nov  7 04:06:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=5a3599df

Revert "fsck: add the ability to specify mount points to check"

This reverts commit e3b39a677b535bc2676a939519906f6b2dbce6f4.

I misunderstood and thought this was ready to go in the tree, but it was
on a remote branch only for a review.

---
 conf.d/fsck    |    7 -------
 init.d/fsck.in |   13 +------------
 2 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/conf.d/fsck b/conf.d/fsck
index 16aa575..5d42c9d 100644
--- a/conf.d/fsck
+++ b/conf.d/fsck
@@ -13,13 +13,6 @@
 #fsck_passno=">1"
 #fsck_passno="<2"
 
-# If passno is not enough granularity, you can also specify mountpoints to
-# check. This should NOT be used for the default non-multiplexed fsck, or your
-# system might not be checked. Additionally, it is mutually exclusive with
-# the fsck_passno setting.
-#fsck_mnt=""
-#fsck_mnt="/home"
-
 # Most modern fs's don't require a full fsck on boot, but for those that do
 # it may be advisable to skip this when running on battery.
 # WARNING: Do not turn this off if you have any JFS partitions.

diff --git a/init.d/fsck.in b/init.d/fsck.in
index 03b2939..54537f6 100644
--- a/init.d/fsck.in
+++ b/init.d/fsck.in
@@ -48,13 +48,8 @@ start()
 
 	if [ -n "$fsck_passno" ]; then
 		check_extra="[passno $fsck_passno] $check_extra"
-		if -n "$fsck_mnt" ]; then
-			eerror "Only 1 of fsck_passno and fsck_mnt must be set!"
-			return 1
-		fi
 	fi
 	ebegin "Checking local filesystems $check_extra"
-	# Append passno mounts
 	for p in $fsck_passno; do
 		local IFS="$_IFS"
 		case "$p" in
@@ -63,16 +58,10 @@ start()
 		set -- "$@" $(fstabinfo --passno "$p")
 		unset IFS
 	done
-	# Append custom mounts
-	for m in $fsck_mnt ; do
-		local IFS="$_IFS"
-		set -- "$@" "$m"
-		unset IFS
-	done
 
 	if [ "$RC_UNAME" = Linux ]; then
 		fsck_opts="$fsck_opts -C0 -T"
-		if [ -z "$fsck_passno" -a -z "$fsck_mnt" ]; then
+		if [ -z "$fsck_passno" ]; then
 			fsck_args=${fsck_args--A -p}
 			if echo 2>/dev/null >/.test.$$; then
 				rm -f /.test.$$



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2011-11-23  0:55 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2011-11-23  0:55 UTC (permalink / raw
  To: gentoo-commits

commit:     815952a65a9cf41d3d1f353e6bee5cef4de4805a
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 18:56:29 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 18:56:29 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=815952a6

Revert "Revert "fsck: add the ability to specify mount points to check""

This reverts commit 5a3599df8a15b1212857335101c9d31fb19e87e2.

After review, I am bringing this back to the tree.

---
 conf.d/fsck    |    7 +++++++
 init.d/fsck.in |   13 ++++++++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/conf.d/fsck b/conf.d/fsck
index 5d42c9d..16aa575 100644
--- a/conf.d/fsck
+++ b/conf.d/fsck
@@ -13,6 +13,13 @@
 #fsck_passno=">1"
 #fsck_passno="<2"
 
+# If passno is not enough granularity, you can also specify mountpoints to
+# check. This should NOT be used for the default non-multiplexed fsck, or your
+# system might not be checked. Additionally, it is mutually exclusive with
+# the fsck_passno setting.
+#fsck_mnt=""
+#fsck_mnt="/home"
+
 # Most modern fs's don't require a full fsck on boot, but for those that do
 # it may be advisable to skip this when running on battery.
 # WARNING: Do not turn this off if you have any JFS partitions.

diff --git a/init.d/fsck.in b/init.d/fsck.in
index 54537f6..03b2939 100644
--- a/init.d/fsck.in
+++ b/init.d/fsck.in
@@ -48,8 +48,13 @@ start()
 
 	if [ -n "$fsck_passno" ]; then
 		check_extra="[passno $fsck_passno] $check_extra"
+		if -n "$fsck_mnt" ]; then
+			eerror "Only 1 of fsck_passno and fsck_mnt must be set!"
+			return 1
+		fi
 	fi
 	ebegin "Checking local filesystems $check_extra"
+	# Append passno mounts
 	for p in $fsck_passno; do
 		local IFS="$_IFS"
 		case "$p" in
@@ -58,10 +63,16 @@ start()
 		set -- "$@" $(fstabinfo --passno "$p")
 		unset IFS
 	done
+	# Append custom mounts
+	for m in $fsck_mnt ; do
+		local IFS="$_IFS"
+		set -- "$@" "$m"
+		unset IFS
+	done
 
 	if [ "$RC_UNAME" = Linux ]; then
 		fsck_opts="$fsck_opts -C0 -T"
-		if [ -z "$fsck_passno" ]; then
+		if [ -z "$fsck_passno" -a -z "$fsck_mnt" ]; then
 			fsck_args=${fsck_args--A -p}
 			if echo 2>/dev/null >/.test.$$; then
 				rm -f /.test.$$



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2011-11-26 18:22 Mike Frysinger
  0 siblings, 0 replies; 18+ messages in thread
From: Mike Frysinger @ 2011-11-26 18:22 UTC (permalink / raw
  To: gentoo-commits

commit:     d8e739e19af48c2dab884d61ecd22e8a54e23883
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 26 18:21:54 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Nov 26 18:21:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=d8e739e1

urandom: move seed from /var/run to /var/lib

We want the seed to be preserved across reboots, so move it to /var/lib.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 conf.d/urandom    |    2 +-
 init.d/urandom.in |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf.d/urandom b/conf.d/urandom
index fbaf4e8..f721a24 100644
--- a/conf.d/urandom
+++ b/conf.d/urandom
@@ -2,4 +2,4 @@
 # (say for crypt swap), so you will need to customize this
 # behavior.  If you have /var on a separate partition, then
 # make sure this path lives on your root device somewhere.
-urandom_seed="/var/run/random-seed"
+urandom_seed="/var/lib/misc/random-seed"

diff --git a/init.d/urandom.in b/init.d/urandom.in
index 7fe5e59..bc48066 100644
--- a/init.d/urandom.in
+++ b/init.d/urandom.in
@@ -2,7 +2,7 @@
 # Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
 # Released under the 2-clause BSD license.
 
-: ${urandom_seed:=${URANDOM_SEED:-/var/run/random-seed}}
+: ${urandom_seed:=${URANDOM_SEED:-/var/lib/misc/random-seed}}
 description="Initializes the random number generator."
 
 depend()



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2012-02-18 19:11 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2012-02-18 19:11 UTC (permalink / raw
  To: gentoo-commits

commit:     04afaa3c03ac7400c06a6b5f17cee99cdd4bfaeb
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 17 21:02:10 2012 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Feb 18 18:49:19 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=04afaa3c

hwclock: set the hardware clock on shutdown

Previously, the default on linux systems was to not set the hardware
clock to match the system clock during shutdown.
This changes that default to be consistent with *bsd and swclock.

---
 conf.d/hwclock    |    6 +++---
 init.d/hwclock.in |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/conf.d/hwclock b/conf.d/hwclock
index 448c2d9..230d81d 100644
--- a/conf.d/hwclock
+++ b/conf.d/hwclock
@@ -9,9 +9,9 @@ clock="UTC"
 # running a modern kernel with CONFIG_RTC_HCTOSYS set to y.
 #clock_hctosys="YES"
 
-# If you want to set the hardware clock to the current system time
-# (software clock) during shutdown, set this to yes.
-#clock_systohc="NO"
+# If you do not want to set the hardware clock to the current system
+# time (software clock) during shutdown, set this to no.
+#clock_systohc="YES"
 
 # If you wish to pass any other arguments to hwclock during bootup,
 # you may do so here. Alpha users may wish to use --arc or --srm here.

diff --git a/init.d/hwclock.in b/init.d/hwclock.in
index 7f2323a..eb44f62 100644
--- a/init.d/hwclock.in
+++ b/init.d/hwclock.in
@@ -111,7 +111,7 @@ stop()
 {
 	# Don't tweak the hardware clock on LiveCD halt.
 	[ -n "$CDBOOT" ] && return 0
-	yesno ${clock_systohc:-NO} || return 0
+	yesno ${clock_systohc:-YES} || return 0
 
 	local retval=0 errstr=""
 	setupopts



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2012-02-18 19:11 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2012-02-18 19:11 UTC (permalink / raw
  To: gentoo-commits

commit:     a21a2c3e32656cf2a153b3cd9f19eb7fae1f3c7a
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 17 20:23:54 2012 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 20:53:37 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=a21a2c3e

hwclock: Clarify documentation

The clock_hctosys and clock_systohc settings really do not have anything
to do with running an ntp daemon, so remove that reference from the
documentation.

Reported-by: Milos Ivanovic <milosivanovic <AT> orcon.net.nz>
X-Gentoo-Bug: 401433
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401433

---
 conf.d/hwclock    |   14 +++++---------
 init.d/hwclock.in |    4 ++--
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/conf.d/hwclock b/conf.d/hwclock
index a94cdb2..448c2d9 100644
--- a/conf.d/hwclock
+++ b/conf.d/hwclock
@@ -4,18 +4,14 @@
 # you should set it to "local".
 clock="UTC"
 
-# If you want to set the Hardware Clock to the current System Time
-# (software clock) during shutdown, then say "YES" here.
-# You normally don't need to do this if you run a ntp daemon.
-clock_systohc="NO"
-
 # If you want to set the system time to the current hardware clock
 # during bootup, then say "YES" here. You do not need this if you are
 # running a modern kernel with CONFIG_RTC_HCTOSYS set to y.
-# Also, be aware that if you set this to "NO", the system time will
-# never be saved to the hardware clock unless you set
-# clock_systohc="YES" above.
-clock_hctosys="YES"
+#clock_hctosys="YES"
+
+# If you want to set the hardware clock to the current system time
+# (software clock) during shutdown, set this to yes.
+#clock_systohc="NO"
 
 # If you wish to pass any other arguments to hwclock during bootup,
 # you may do so here. Alpha users may wish to use --arc or --srm here.

diff --git a/init.d/hwclock.in b/init.d/hwclock.in
index cfb25ae..7f2323a 100644
--- a/init.d/hwclock.in
+++ b/init.d/hwclock.in
@@ -94,7 +94,7 @@ start()
 		"$utc_cmd" != --utc -o \
 		-n "$clock_args" ];
 	then
-		if yesno $clock_hctosys; then
+		if yesno ${clock_hctosys:-YES}; then
 			_hwclock --hctosys $utc_cmd $clock_args
 		else
 			_hwclock --systz $utc_cmd $clock_args
@@ -111,7 +111,7 @@ stop()
 {
 	# Don't tweak the hardware clock on LiveCD halt.
 	[ -n "$CDBOOT" ] && return 0
-	yesno $clock_systohc || return 0
+	yesno ${clock_systohc:-NO} || return 0
 
 	local retval=0 errstr=""
 	setupopts



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2012-10-26  0:58 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2012-10-26  0:58 UTC (permalink / raw
  To: gentoo-commits

commit:     5148047f8996df41b02543efd293ed02c83c8ee6
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Oct 25 21:33:43 2012 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Oct 25 21:33:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=5148047f

netmount: drop need net from dependencies

Reported-by: <mattsch <AT> gmail.com>
X-Gentoo-Bug: 439658
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439658

---
 conf.d/Makefile    |    3 ++-
 conf.d/netmount    |   20 ++++++++++++++++++++
 init.d/netmount.in |    1 -
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/conf.d/Makefile b/conf.d/Makefile
index 0e61021..1f28967 100644
--- a/conf.d/Makefile
+++ b/conf.d/Makefile
@@ -1,5 +1,6 @@
 DIR=	${CONFDIR}
-CONF=	bootmisc fsck hostname localmount urandom tmpfilesd ${CONF-${OS}}
+CONF=	bootmisc fsck hostname localmount netmount urandom tmpfilesd \
+		${CONF-${OS}}
 
 ifeq (${MKNET},)
 CONF+= network staticroute

diff --git a/conf.d/netmount b/conf.d/netmount
new file mode 100644
index 0000000..7df2c8d
--- /dev/null
+++ b/conf.d/netmount
@@ -0,0 +1,20 @@
+# Depending on how mounting your network file systems behaves when your
+# network interfaces are down, you may need to set the netmount script to
+# require  specific network interfaces to be active. This file gives
+# examples of how to do this:
+#
+# If you are using newnet and configuring the interface with a static
+# address with the network script:
+# rc_need="network"
+#
+# If you are using oldnet, you must list the specific net.* services you
+# need:
+#
+# rc_need="net.eth0"
+# rc_need="net.eth1 net.eth2"
+#
+# If you are using a dynamic network management tool like
+# networkmanager, dhcpcd, etc, you should list that tool here.
+#
+# rc_need="networkmanager"
+# rc_need="dhcpcd"

diff --git a/init.d/netmount.in b/init.d/netmount.in
index 57ef6d7..fd577d5 100644
--- a/init.d/netmount.in
+++ b/init.d/netmount.in
@@ -10,7 +10,6 @@ description="Mounts network shares, other than NFS, according to /etc/fstab."
 depend()
 {
 	config /etc/fstab
-	need net
 	use afc-client amd autofs openvpn
 	use dns
 	keyword -jail -prefix -vserver


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2014-01-05 21:59 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2014-01-05 21:59 UTC (permalink / raw
  To: gentoo-commits

commit:     8352082eb6582d6e7adc26fc64dfd2255eadf2a7
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Sun Dec  1 22:31:02 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 17:17:05 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=8352082e

devfs: add code to mount /dev

All Linux systems need /dev to be set up,so add code to devfs to do
this. The process devfs follows is below.

1. If static_dev is yes, nothing is done.
2. if /dev is an entry in fstab it is mounted or remounted based on that
entry.
3. If /dev is not in fstab, it attempts to mount /dev as a devtmpfs or
   tmpfs depending on which is defined in the kernel; devtmpfs is
   preferred.
4. If neither devtmpfs nor tmpfs is defined, it assumes the user wants
static /dev and prints a warning.

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

---
 conf.d/Makefile |  2 +-
 conf.d/devfs    |  2 ++
 init.d/devfs.in | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 69 insertions(+), 5 deletions(-)

diff --git a/conf.d/Makefile b/conf.d/Makefile
index aefb612..93476fc 100644
--- a/conf.d/Makefile
+++ b/conf.d/Makefile
@@ -15,7 +15,7 @@ include ${MK}/os.mk
 
 CONF-FreeBSD=	ipfw moused powerd rarpd savecore syscons
 
-CONF-Linux=	consolefont dmesg hwclock keymaps killprocs modules
+CONF-Linux=	consolefont devfs dmesg hwclock keymaps killprocs modules
 
 CONF-NetBSD=	moused rarpd savecore
 

diff --git a/conf.d/devfs b/conf.d/devfs
new file mode 100644
index 0000000..92a8a99
--- /dev/null
+++ b/conf.d/devfs
@@ -0,0 +1,2 @@
+# Set this to yes if your /dev is not a devtmpfs or tmpfs.
+# static_dev="NO"

diff --git a/init.d/devfs.in b/init.d/devfs.in
index 5c167b0..7fba882 100644
--- a/init.d/devfs.in
+++ b/init.d/devfs.in
@@ -2,15 +2,71 @@
 # Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
 # Released under the 2-clause BSD license.
 
-description="Mount system critical filesystems in /dev."
+description="Set up the /dev directory"
 
-depend() {
-	use dev-mount
+depend()
+{
+	provide dev-mount
 	before dev
 	keyword -prefix -vserver -lxc
 }
 
-start() {
+mount_dev()
+{
+	local action=--mount devfstype msg=Mounting
+	# Some devices require exec, Bug #92921
+	local mountopts="exec,nosuid,mode=0755"
+	if yesno ${static_dev:-no}; then
+		einfo "Using static /dev"
+		return 0
+	fi
+	if mountinfo -q /dev; then
+		action=--remount
+		mountopts="remount,$mountopts"
+		msg=Remounting
+	fi
+	if fstabinfo -q /dev; then
+		ebegin "$msg /dev according to @SYSCONFDIR@/fstab"
+		fstabinfo -q $action /dev
+		eend $?
+		return 0
+	fi
+	if grep -q devtmpfs /proc/filesystems; then
+		devfstype=devtmpfs
+		mountopts="$mountopts,size=10M"
+	elif grep -q tmpfs /proc/filesystems; then
+		devfstype=tmpfs
+		mountopts="$mountopts,size=10M"
+	fi
+	if [ -n "$devfstype" ]; then
+		ebegin "$msg $devfstype on /dev"
+		mount -n -t $devfstype -o $mountopts dev /dev
+		eend $?
+	else
+		ewarn "This kernel does not have devtmpfs or tmpfs support."
+		ewarn "Assuming you want static /dev. If this is not the case,"
+		ewarn "please set the CONFIG_DEVTMPFS or CONFIG_TMPFS option"
+		ewarn "in your kernel."
+	fi
+}
+
+seed_dev()
+{
+	# Seed /dev with some things that we know we need
+
+	# creating /dev/console, /dev/tty and /dev/tty1 to be able to write
+	# to $CONSOLE with/without bootsplash before udevd creates it
+	[ -c /dev/console ] || mknod -m 600 /dev/console c 5 1
+	[ -c /dev/tty1 ] || mknod -m 620 /dev/tty1 c 4 1
+	[ -c /dev/tty ] || mknod -m 666 /dev/tty c 5 0
+
+	# udevd will dup its stdin/stdout/stderr to /dev/null
+	# and we do not want a file which gets buffered in ram
+	[ -c /dev/null ] || mknod -m 666 /dev/null c 1 3
+
+	# so udev can add its start-message to dmesg
+	[ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11
+
 	# Mount required stuff as user may not have then in /etc/fstab
 	for x in \
 		"mqueue /dev/mqueue 1777 ,nodev mqueue" \
@@ -34,5 +90,11 @@ start() {
 			eend $?
 		fi
 	done
+}
+
+start()
+{
+	mount_dev
+	seed_dev
 	return 0
 }


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
  2014-08-22 19:10 William Hubbs
@ 2014-08-08 23:19 ` William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2014-08-08 23:19 UTC (permalink / raw
  To: gentoo-commits

commit:     6a337ff6c531d9d7310253b67b3e95d1ce5d214c
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Fri Aug  8 19:49:00 2014 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Aug  8 19:49:00 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=6a337ff6

devfs: several small clarifications

- Rename the static_dev switch in conf.d/devfs to skip_mount_dev since
  this is a better description of what the switch does.

- Clarify the error messages in the devfs service script based on the
  new name of the switch.

---
 conf.d/devfs    | 10 ++++++++--
 init.d/devfs.in | 14 ++++++++------
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/conf.d/devfs b/conf.d/devfs
index 92a8a99..51f8037 100644
--- a/conf.d/devfs
+++ b/conf.d/devfs
@@ -1,2 +1,8 @@
-# Set this to yes if your /dev is not a devtmpfs or tmpfs.
-# static_dev="NO"
+# OpenRC will attempt each of the following in succession to mount /dev.
+#
+# 1. If there is an entry for /dev in fstab, it will be used.
+# 2. If devtmpfs is defined in the kernel, it will be used.
+# 3. If tmpfs is defined in the kernel, it will be used.
+#
+# Set this to yes if you do not want OpenRC to attempt to mount /dev.
+# skip_mount_dev="NO"

diff --git a/init.d/devfs.in b/init.d/devfs.in
index ca24231..bcdbdcd 100644
--- a/init.d/devfs.in
+++ b/init.d/devfs.in
@@ -16,8 +16,8 @@ mount_dev()
 	local action=--mount devfstype msg=Mounting
 	# Some devices require exec, Bug #92921
 	local mountopts="exec,nosuid,mode=0755"
-	if yesno ${static_dev:-no}; then
-		einfo "Using static /dev"
+	if yesno ${skip_mount_dev:-no} ; then
+		einfo "/dev will not be mounted due to user request"
 		return 0
 	fi
 	if mountinfo -q /dev; then
@@ -43,11 +43,13 @@ mount_dev()
 		mount -n -t $devfstype -o $mountopts dev /dev
 		eend $?
 	else
-		ewarn "This kernel does not have devtmpfs or tmpfs support."
-		ewarn "Assuming you want static /dev. If this is not the case,"
-		ewarn "please set the CONFIG_DEVTMPFS or CONFIG_TMPFS option"
-		ewarn "in your kernel."
+		ewarn "This kernel does not have devtmpfs or tmpfs support, and there"
+		ewarn "is no entry for /dev in fstab."
+		ewarn "This means /dev will not be mounted."
+		ewarn "To avoid this message, set CONFIG_DEVTMPFS or CONFIG_TMPFS to y"
+		ewarn "in your kernel configuration or see @SYSCONFDIR@/conf.d/devfs"
 	fi
+	return 0
 }
 
 seed_dev()


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2014-08-22 19:10 William Hubbs
  2014-08-08 23:19 ` William Hubbs
  0 siblings, 1 reply; 18+ messages in thread
From: William Hubbs @ 2014-08-22 19:10 UTC (permalink / raw
  To: gentoo-commits

commit:     6a337ff6c531d9d7310253b67b3e95d1ce5d214c
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Fri Aug  8 19:49:00 2014 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Aug  8 19:49:00 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=6a337ff6

devfs: several small clarifications

- Rename the static_dev switch in conf.d/devfs to skip_mount_dev since
  this is a better description of what the switch does.

- Clarify the error messages in the devfs service script based on the
  new name of the switch.

---
 conf.d/devfs    | 10 ++++++++--
 init.d/devfs.in | 14 ++++++++------
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/conf.d/devfs b/conf.d/devfs
index 92a8a99..51f8037 100644
--- a/conf.d/devfs
+++ b/conf.d/devfs
@@ -1,2 +1,8 @@
-# Set this to yes if your /dev is not a devtmpfs or tmpfs.
-# static_dev="NO"
+# OpenRC will attempt each of the following in succession to mount /dev.
+#
+# 1. If there is an entry for /dev in fstab, it will be used.
+# 2. If devtmpfs is defined in the kernel, it will be used.
+# 3. If tmpfs is defined in the kernel, it will be used.
+#
+# Set this to yes if you do not want OpenRC to attempt to mount /dev.
+# skip_mount_dev="NO"

diff --git a/init.d/devfs.in b/init.d/devfs.in
index ca24231..bcdbdcd 100644
--- a/init.d/devfs.in
+++ b/init.d/devfs.in
@@ -16,8 +16,8 @@ mount_dev()
 	local action=--mount devfstype msg=Mounting
 	# Some devices require exec, Bug #92921
 	local mountopts="exec,nosuid,mode=0755"
-	if yesno ${static_dev:-no}; then
-		einfo "Using static /dev"
+	if yesno ${skip_mount_dev:-no} ; then
+		einfo "/dev will not be mounted due to user request"
 		return 0
 	fi
 	if mountinfo -q /dev; then
@@ -43,11 +43,13 @@ mount_dev()
 		mount -n -t $devfstype -o $mountopts dev /dev
 		eend $?
 	else
-		ewarn "This kernel does not have devtmpfs or tmpfs support."
-		ewarn "Assuming you want static /dev. If this is not the case,"
-		ewarn "please set the CONFIG_DEVTMPFS or CONFIG_TMPFS option"
-		ewarn "in your kernel."
+		ewarn "This kernel does not have devtmpfs or tmpfs support, and there"
+		ewarn "is no entry for /dev in fstab."
+		ewarn "This means /dev will not be mounted."
+		ewarn "To avoid this message, set CONFIG_DEVTMPFS or CONFIG_TMPFS to y"
+		ewarn "in your kernel configuration or see @SYSCONFDIR@/conf.d/devfs"
 	fi
+	return 0
 }
 
 seed_dev()


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2016-01-13 17:02 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2016-01-13 17:02 UTC (permalink / raw
  To: gentoo-commits

commit:     9473ac514cb72663d5c3bac8b5473cced4a20bf7
Author:     joe9 <joe9mail <AT> gmail <DOT> com>
AuthorDate: Sat Oct 24 22:55:59 2015 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Jan 13 16:52:22 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=9473ac51

allow the user to decide whether fsck aborts for errors

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

 conf.d/fsck    | 6 ++++++
 init.d/fsck.in | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/conf.d/fsck b/conf.d/fsck
index 16aa575..30131ea 100644
--- a/conf.d/fsck
+++ b/conf.d/fsck
@@ -32,3 +32,9 @@ fsck_on_battery="YES"
 # This is useful when periodic filesystem checks are causing undesirable
 # delays at startup, but such delays at shutdown are acceptable.
 fsck_shutdown="NO"
+
+# fsck_abort_on_errors can be set to no to cause fsck to not abort on
+# errors.
+# This is useful when periodic filesystem checks are causing undesirable
+# aborts.
+fsck_abort_on_errors="YES"

diff --git a/init.d/fsck.in b/init.d/fsck.in
index 5e5b3e9..005e87f 100644
--- a/init.d/fsck.in
+++ b/init.d/fsck.in
@@ -20,7 +20,7 @@ depend()
 }
 
 _abort() {
-	rc-abort
+	yesno ${fsck_abort_on_errors:-yes} && rc-abort
 	return 1
 }
 


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2016-01-19 19:37 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2016-01-19 19:37 UTC (permalink / raw
  To: gentoo-commits

commit:     cd7883d25d0a9321b68df1c1e6ad9662306fa9e7
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Jan 19 18:32:56 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jan 19 19:34:04 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=cd7883d2

localmount: Allow users to control whether errors are ignored

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

 conf.d/localmount    | 6 ++++++
 init.d/localmount.in | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/conf.d/localmount b/conf.d/localmount
index e3361da..397e8cd 100644
--- a/conf.d/localmount
+++ b/conf.d/localmount
@@ -1,3 +1,9 @@
 # Stop the unmounting of certain points.
 # This could be useful for some NFS related work.
 #no_umounts="/dir1:/var/dir2"
+#
+# Ignore errors when mounting local file systems.
+# This should be left alone unless you know what you are doing. If it is
+# set to yes, not only will we allow mount failures, but we will ignore
+# syntax errors in fstab.
+#ignore_mount_errors="NO"

diff --git a/init.d/localmount.in b/init.d/localmount.in
index a2b7a8a..cfc841a 100644
--- a/init.d/localmount.in
+++ b/init.d/localmount.in
@@ -39,6 +39,11 @@ start()
 	rc=$?
 	if [ "$RC_UNAME" != Linux ]; then
 		rc=0
+	elif yesno "${ignore_mount_errors:-NO}"; then
+		if [ $rc -ne 0 ]; then
+			ewarn "localmount: errors detected, but ignored"
+		fi
+		rc=0
 	fi
 	return $rc
 }


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2016-04-25 17:12 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2016-04-25 17:12 UTC (permalink / raw
  To: gentoo-commits

commit:     5d130cc45cd334fd38b0c6874bcc81ac74636217
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Apr 25 17:04:34 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 17:04:34 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=5d130cc4

localmount/netmount: allow mount points to be marked critical

In previous releases, we either treated no mount points as critical or
all of them.

Now both localmount and netmount support a critical_mounts setting. If
mount points listed in this setting fail to mount, localmount and
netmount will fail.

 conf.d/localmount    | 11 ++++++-----
 conf.d/netmount      |  7 +++++++
 init.d/localmount.in | 14 +++++++-------
 init.d/netmount.in   |  7 ++++++-
 4 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/conf.d/localmount b/conf.d/localmount
index 397e8cd..e727719 100644
--- a/conf.d/localmount
+++ b/conf.d/localmount
@@ -2,8 +2,9 @@
 # This could be useful for some NFS related work.
 #no_umounts="/dir1:/var/dir2"
 #
-# Ignore errors when mounting local file systems.
-# This should be left alone unless you know what you are doing. If it is
-# set to yes, not only will we allow mount failures, but we will ignore
-# syntax errors in fstab.
-#ignore_mount_errors="NO"
+# Mark certain mount points as critical.
+# This contains aspace separated list of mount points which should be
+# considered critical. If one of these mount points cannot be mounted,
+# localmount will fail.
+# By default, this is empty.
+#critical_mounts="/home /var"

diff --git a/conf.d/netmount b/conf.d/netmount
index 53717fc..e759adf 100644
--- a/conf.d/netmount
+++ b/conf.d/netmount
@@ -38,3 +38,10 @@
 # other words, please change it to be more suited to your system.
 #
 rc_need="net"
+#
+# Mark certain mount points as critical.
+# This contains aspace separated list of mount points which should be
+# considered critical. If one of these mount points cannot be mounted,
+# netmount will fail.
+# By default, this is empty.
+#critical_mounts="/home /var"

diff --git a/init.d/localmount.in b/init.d/localmount.in
index cfc841a..96ccc44 100644
--- a/init.d/localmount.in
+++ b/init.d/localmount.in
@@ -22,7 +22,7 @@ depend()
 start()
 {
 	# Mount local filesystems in /etc/fstab.
-	local types="noproc" x= no_netdev= rc=
+	local critical= types="noproc" x= no_netdev= rc=
 	for x in $net_fs_list $extra_net_fs_list; do
 		types="${types},no${x}"
 	done
@@ -37,13 +37,13 @@ start()
 	mount -at "$types" $no_netdev
 	eend $? "Some local filesystem failed to mount"
 	rc=$?
-	if [ "$RC_UNAME" != Linux ]; then
-		rc=0
-	elif yesno "${ignore_mount_errors:-NO}"; then
-		if [ $rc -ne 0 ]; then
-			ewarn "localmount: errors detected, but ignored"
-		fi
+	if [ -z "$critical_mounts" ]; then
 		rc=0
+	else
+		for x in ${critical_mounts}; do
+		mountinfo -q $x || critical=x
+		done
+		[-z "$critical" ] && rc=0
 	fi
 	return $rc
 }

diff --git a/init.d/netmount.in b/init.d/netmount.in
index f7237f1..0febde2 100644
--- a/init.d/netmount.in
+++ b/init.d/netmount.in
@@ -42,8 +42,13 @@ start()
 		rc=$?
 	fi
 	ewend $rc "Could not mount all network filesystems"
-	if [ "$RC_UNAME" != Linux ]; then
+	if [ -z "$critical_mounts" ]; then
 		rc=0
+	else
+		for x in ${critical_mounts}; do
+		mountinfo -q $x || critical=x
+		done
+		[-z "$critical" ] && rc=0
 	fi
 	return $rc
 }


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2017-05-22 17:54 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2017-05-22 17:54 UTC (permalink / raw
  To: gentoo-commits

commit:     ec27299f4b88daa80261298fafea76ae634744d9
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon May 22 17:46:55 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon May 22 17:52:58 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=ec27299f

typo fix

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

 conf.d/agetty    | 2 +-
 init.d/agetty.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf.d/agetty b/conf.d/agetty
index 012eb8de..527ce4c2 100644
--- a/conf.d/agetty
+++ b/conf.d/agetty
@@ -2,7 +2,7 @@
 #baud=""
 
 # set the terminal type
-#termtype="linux"
+#term_type="linux"
 
 # extra options to pass to agetty for this port
 #agetty_options=""

diff --git a/init.d/agetty.in b/init.d/agetty.in
index d2ba9449..f6cc12da 100644
--- a/init.d/agetty.in
+++ b/init.d/agetty.in
@@ -14,7 +14,7 @@ supervisor=supervise-daemon
 port="${RC_SVCNAME#*.}"
 term_type="${term_type:-linux}"
 command=/sbin/agetty
-command_args_foreground="${agetty_options} ${port} ${baud} ${termtype}"
+command_args_foreground="${agetty_options} ${port} ${baud} ${term_type}"
 pidfile="/run/${RC_SVCNAME}.pid"
 
 depend() {


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
@ 2017-10-06 19:44 William Hubbs
  0 siblings, 0 replies; 18+ messages in thread
From: William Hubbs @ 2017-10-06 19:44 UTC (permalink / raw
  To: gentoo-commits

commit:     d4ddd72701ff5533a1ba07b1da60806859c63d88
Author:     Chris Cromer <chris <AT> cromer <DOT> cl>
AuthorDate: Fri Oct  6 19:42:52 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Oct  6 19:43:59 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=d4ddd727

add option to make agetty startup quiet

This fixes #150

 conf.d/agetty    | 3 +++
 init.d/agetty.in | 1 +
 2 files changed, 4 insertions(+)

diff --git a/conf.d/agetty b/conf.d/agetty
index 527ce4c2..03acee65 100644
--- a/conf.d/agetty
+++ b/conf.d/agetty
@@ -1,3 +1,6 @@
+# make agetty quiet
+#quiet="yes"
+
 # Set the baud rate of the terminal line
 #baud=""
 

diff --git a/init.d/agetty.in b/init.d/agetty.in
index f6cc12da..390b1317 100644
--- a/init.d/agetty.in
+++ b/init.d/agetty.in
@@ -16,6 +16,7 @@ term_type="${term_type:-linux}"
 command=/sbin/agetty
 command_args_foreground="${agetty_options} ${port} ${baud} ${term_type}"
 pidfile="/run/${RC_SVCNAME}.pid"
+export EINFO_QUIET="${quiet:-yes}"
 
 depend() {
 	after local


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-10-06 19:44 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23  0:55 [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/ William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
2017-10-06 19:44 William Hubbs
2017-05-22 17:54 William Hubbs
2016-04-25 17:12 William Hubbs
2016-01-19 19:37 William Hubbs
2016-01-13 17:02 William Hubbs
2014-08-22 19:10 William Hubbs
2014-08-08 23:19 ` William Hubbs
2014-01-05 21:59 William Hubbs
2012-10-26  0:58 William Hubbs
2012-02-18 19:11 William Hubbs
2012-02-18 19:11 William Hubbs
2011-11-26 18:22 Mike Frysinger
2011-11-07  4:07 William Hubbs
2011-11-06 20:04 William Hubbs
2011-09-27 16:16 Christian Ruppert
2011-07-04  7:52 Robin H. Johnson
2011-06-24  2:58 William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox