]> Frank Brehm's Git Trees - config/helga/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorroot <root@helga.brehm-online.com>
Mon, 15 May 2017 15:08:35 +0000 (17:08 +0200)
committerroot <root@helga.brehm-online.com>
Mon, 15 May 2017 15:08:35 +0000 (17:08 +0200)
12 files changed:
.etckeeper
conf.d/agetty [new file with mode: 0644]
conf.d/net-online
init.d/agetty [new file with mode: 0755]
init.d/hwclock
init.d/localmount
init.d/loopback
init.d/modules
init.d/net-online
init.d/netmount
init.d/swclock
init.d/sysfs

index 43f6409618ac14cae20671f95f093bc95a71c2d3..71fbb983b0b106d835ff80fb1241f489e90364bc 100755 (executable)
@@ -396,6 +396,7 @@ maybe chmod 0644 'colordiffrc'
 maybe chmod 0644 'colordiffrc-gitdiff'
 maybe chmod 0644 'colordiffrc-lightbg'
 maybe chmod 0755 'conf.d'
+maybe chmod 0644 'conf.d/agetty'
 maybe chmod 0644 'conf.d/apache2'
 maybe chmod 0644 'conf.d/apache2.sarah'
 maybe chmod 0644 'conf.d/atd'
@@ -1640,6 +1641,7 @@ maybe chmod 0644 'idn.conf.sample'
 maybe chmod 0644 'idnalias.conf'
 maybe chmod 0644 'idnalias.conf.sample'
 maybe chmod 0755 'init.d'
+maybe chmod 0755 'init.d/agetty'
 maybe chmod 0755 'init.d/amavisd'
 maybe chmod 0755 'init.d/amavisd-snmp'
 maybe chmod 0755 'init.d/apache2'
diff --git a/conf.d/agetty b/conf.d/agetty
new file mode 100644 (file)
index 0000000..012eb8d
--- /dev/null
@@ -0,0 +1,8 @@
+# Set the baud rate of the terminal line
+#baud=""
+
+# set the terminal type
+#termtype="linux"
+
+# extra options to pass to agetty for this port
+#agetty_options=""
index aa2c76ba6177c4b0796378ddba26d29c539abd89..9abe9ea4a330d8919b505b5c7e6d79d03942b404 100644 (file)
@@ -3,10 +3,13 @@
 # default is all interfaces that support ethernet.
 #interfaces=""
 
-# This setting controls whether a ping to the default gateway is
-# included in the test for network connectivity after all interfaces
-# are active.
-#ping_default_gateway=no
+# This setting controls whether a ping test is included in the test for
+# network connectivity after all interfaces are active.
+#include_ping_test=no
+
+# This setting is the host to attempt to ping if the above is yes.
+# The default is google.com.
+#ping_test_host=some.host.name
 
 # The timeout setting controls how long the net-online service waits
 # for the network to be configured.
diff --git a/init.d/agetty b/init.d/agetty
new file mode 100755 (executable)
index 0000000..c45459e
--- /dev/null
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright (c) 2017 The OpenRC Authors.
+# See the Authors file at the top-level directory of this distribution and
+# https://github.com/OpenRC/openrc/blob/master/AUTHORS
+#
+# This file is part of OpenRC. It is subject to the license terms in
+# the LICENSE file found in the top-level directory of this
+# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
+# This file may not be copied, modified, propagated, or distributed
+# except according to the terms contained in the LICENSE file.
+
+description="start agetty on a terminal line"
+supervisor=supervise-daemon
+port="${RC_SVCNAME#*.}"
+term_type="${term_type:-linux}"
+command=/sbin/agetty
+command_args_foreground="${agetty_options} ${port} ${baud} ${termtype}"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+       after local
+}
+
+start_pre() {
+       if [ -z "$port" ]; then
+               eerror "${RC_SVCNAME} cannot be started directly. You must create"
+               eerror "symbolic links to it for the ports you want to start"
+               eerror "agetty on and add those to the appropriate runlevels."
+               return 1
+       fi
+}
index 897f02102525560082b772d7415c099ed3863d30..ebe821b6983fb58cef0ab7b62c3a9236fb643735 100755 (executable)
@@ -34,7 +34,8 @@ depend()
        if yesno $clock_adjfile; then
                use root
        else
-               before *
+               before binfmt bootmisc fsck hostname keymaps localmount loopback mtab
+               before procfs root swap sysctl termencoding urandom
        fi
        keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
 }
index 92ddec339be53fef3867d3c24d871e8c77c9ac5d..7b9271ffe45082fd0b8dc2fa21ece1d46326cc73 100755 (executable)
@@ -14,17 +14,18 @@ description="Mounts disks and swap according to /etc/fstab."
 depend()
 {
        need fsck
-       use lvm modules mtab
-       after lvm modules
+       use lvm modules mtab root
+       after lvm modules root
        keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver
 }
 
 start()
 {
        # Mount local filesystems in /etc/fstab.
+       # The types variable must start with no, and must be a type
        local critical= types="noproc" x= no_netdev= rc=
        for x in $net_fs_list $extra_net_fs_list; do
-               types="${types},no${x}"
+               types="${types},${x}"
        done
 
        if [ "$RC_UNAME" = Linux ]; then
index 6a0c8a1437f421d9c4bd449be7e17c813c05bdde..fa7ea03bd7895aae065371a7b8bde8e95c51c59c 100755 (executable)
@@ -29,7 +29,6 @@ start()
        else
                ebegin "Bringing up network interface lo0"
                ifconfig lo0 127.0.0.1 netmask 255.0.0.0
-               route -q add -inet 127.0.0.0 -netmask 255.0.0.0 127.0.0.1
        fi
        eend $?
 }
index c97bd55d6781144fd78d4c2c684d106c49d01634..a37b00392f2b89cab2af86cae0a07410abc15615 100755 (executable)
@@ -31,7 +31,7 @@ FreeBSD_modules()
 
 Linux_modules()
 {
-       # Should not fail if kernel do not have module
+       # Should not fail if kernel does not have module
        # support compiled in ...
        [ ! -f /proc/modules ] && return 0
 
@@ -48,22 +48,21 @@ Linux_modules()
                x=${x%.*}
        done
 
-       local list= x= xx= y= args= mpargs= cnt=0 a=
+       local list= x= xx= y= args= mpargs= a=
        for x in $kv_variant_list ; do
                eval list=\$modules_$(shell_var "$x")
                [ -n "$list" ] && break
        done
        [ -z "$list" ] && list=$modules
 
+       [ -n "$list" ] && ebegin "Loading kernel modules"
        for x in $list; do
                a=${x#*:}
                if [ "$a" = "$x" ]; then
                        unset mpargs
-                       ebegin "Loading module $x"
                else
                        x=${x%%:*}
                        mpargs="-o $a"
-                       ebegin "Loading module $x as $a"
                fi
                aa=$(shell_var "$a")
                xx=$(shell_var "$x")
@@ -75,10 +74,9 @@ Linux_modules()
                done
                [ -z "$args" ] && eval args=\$module_${aa}_args
                [ -z "$args" ] && eval args=\$module_${xx}_args
-               eval modprobe --use-blacklist -q "$mpargs" "$x" "$args"
-               eend $? "Failed to load $x" && : $(( cnt += 1 ))
+               eval modprobe --use-blacklist --verbose "$mpargs" "$x" "$args"
        done
-       einfo "Autoloaded $cnt module(s)"
+       [ -n "$list" ] && eend
 }
 
 start()
index 0a1e9977889b23d749fec54b289a45ac28a49a80..815c4feee381d5ca1175576be850e306816024a8 100755 (executable)
@@ -15,6 +15,7 @@ depend()
 {
        after modules
        need sysfs
+       provide network-online
        keyword -docker -jail -lxc -openvz -prefix -systemd-nspawn -uml -vserver
 }
 
@@ -27,19 +28,6 @@ get_interfaces()
        done
 }
 
-get_default_gateway()
-{
-       local cmd gateway
-       if command -v ip > /dev/null 2>&1; then
-               cmd="ip route show"
-       else
-               cmd=route
-       fi
-       set -- $($cmd | grep default)
-       [ "$2" != via ] && gateway="$2" || gateway="$3"
-       printf "%s" $gateway
-}
-
 start ()
 {
        local carriers configured dev gateway ifcount infinite
@@ -66,10 +54,15 @@ start ()
        : $((timeout -= 1))
  done
  ! $infinite && [ $timeout -eq 0 ] && rc=1
- if [ $rc -eq 0 ] && yesno ${ping_default_gateway:-no}; then
-       gateway="$(get_default_gateway)"
-       if [ -n "$gateway" ] && ! ping -c 1 $gateway > /dev/null 2>&1; then
-               rc=1
+ include_ping_test=${include_ping_test:-${ping_default_gateway}}
+ if [ -n "${ping_default_gateway}" ]; then
+ ewarn "ping_default_gateway is deprecated, please use include_ping_test"
+ fi
+ if [ $rc -eq 0 ] && yesno ${include_ping_test:-no}; then
+       ping_test_host="${ping_test_host:-google.com}"
+       if [ -n "$ping_test_host" ]; then
+               ping -c 1 $ping_test_host > /dev/null 2>&1
+               rc=$?
        fi
  fi
  eend $rc "The network is offline"
index 112ac88c52fdcb0b6c76df55081e799809fae5f0..3bb2af745a38c0dd22ee6cd94da6a680e5572c25 100755 (executable)
@@ -20,10 +20,12 @@ depend()
                        *) mywant="$mywant nfsclient"; break ;;
                esac
        done
+       after root
        config /etc/fstab
        want $mywant
        use afc-client amd openvpn
        use dns
+       use root
        keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver
 }
 
index 9bdef99d3e32e6adf0470392cba9527eed852a15..2a93d1faadaa8e65a361a314c510cc40d131346c 100755 (executable)
@@ -13,7 +13,10 @@ description="Sets the local clock to the mtime of a given file."
 
 depend()
 {
-       before *
+       before adjkerntz binfmt bootmisc devdb dumpon fsck hostid hostname keymaps
+       before localmount loopback modules mtab network newsyslog procfs root
+       before savecore staticroute swap swap-blk syscons sysctl syslogd
+       before termencoding ttys urandom wscons
        provide clock
        keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
 }
index 81b5c08aa2e61f2704a93d02a6ebd1165a4f6b9d..67edd4c5de19dea1efcaa31cd7c14b6d2dffd111 100755 (executable)
@@ -15,7 +15,6 @@ sysfs_opts=nodev,noexec,nosuid
 
 depend()
 {
-       want modules
        keyword -docker -lxc -prefix -systemd-nspawn -vserver
 }
 
@@ -99,23 +98,12 @@ mount_misc()
        fi
 
        # set up kernel support for efivarfs
-       # The presence of /sys/firmware/efi indicates that the system was
-       # booted in efi mode.
-       if [ -d /sys/firmware/efi ]; then
-               if [ ! -d /sys/firmware/efi/efivars ] &&
-                       modprobe -q efivarfs; then
-                       ewarn "The efivarfs module needs to be configured in " \
-                                 "/etc/conf.d/modules or built in"
-               fi
-               if [ -d /sys/firmware/efi/efivars ] &&
-                       ! mountinfo -q /sys/firmware/efi/efivars; then
-                       if grep -qs efivarfs /proc/filesystems; then
-                               ebegin "Mounting efivarfs filesystem"
-                               mount -n -t efivarfs -o ${sysfs_opts} \
-                                       efivarfs /sys/firmware/efi/efivars
-                               eend $?
-                       fi
-               fi
+       if [ -d /sys/firmware/efi/efivars ] &&
+               ! mountinfo -q /sys/firmware/efi/efivars; then
+               ebegin "Mounting efivarfs filesystem"
+               mount -n -t efivarfs -o ${sysfs_opts} \
+                       efivarfs /sys/firmware/efi/efivars 2> /dev/null
+               eend 0
        fi
 }