aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2016-06-07 17:28:01 +0100
committerColin Guthrie <colin@mageia.org>2016-06-07 17:28:01 +0100
commitb53d95939e513b135b688548e8b587129ac683dd (patch)
tree7b5aea6656107fafe96382217323d18df5090454
parent08eee6c0c91bcff0c401a12fd7b640a1831408ba (diff)
parent3a01f26785ca58a4c50648dbaccaf5ddbd61e028 (diff)
downloadinitscripts-b53d95939e513b135b688548e8b587129ac683dd.tar
initscripts-b53d95939e513b135b688548e8b587129ac683dd.tar.gz
initscripts-b53d95939e513b135b688548e8b587129ac683dd.tar.bz2
initscripts-b53d95939e513b135b688548e8b587129ac683dd.tar.xz
initscripts-b53d95939e513b135b688548e8b587129ac683dd.zip
Merge tag 'initscripts-9.66-1' into distro/mga
Tag as initscripts-9.66-1 Conflicts: service sysconfig/network-scripts/ifup-wireless Notes: The 'service' wrapper was kept as the Mageia version. We should look into moving this over to the upstream version although some people will likely complain at syntax changes. ifup-wireless was also kept as Mageia version. The changes introduced downstream in the past are complex and we cannot easily merge in the upstream changes. We should try to move away from this. Most users should use network manager but for those using these legacy scripts we should at least try and use e.g. iw rather than the legacy iwconfig utilities.
-rw-r--r--initscripts.spec21
-rw-r--r--rc.d/init.d/functions14
-rwxr-xr-xrc.d/init.d/network4
-rw-r--r--sysconfig.txt2
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth16
-rwxr-xr-xsysconfig/network-scripts/ifup-eth6
-rw-r--r--sysconfig/network-scripts/network-functions4
-rwxr-xr-xsystemd/fedora-autorelabel41
-rw-r--r--systemd/system/fedora-autorelabel-mark.service15
-rw-r--r--systemd/system/fedora-autorelabel.service17
-rw-r--r--systemd/system/fedora-loadmodules.service1
11 files changed, 51 insertions, 90 deletions
diff --git a/initscripts.spec b/initscripts.spec
index c2f29a1e..d7680a9c 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -1,6 +1,6 @@
Summary: Scripts to bring up network interfaces and legacy utilities
Name: initscripts
-Version: 9.64
+Version: 9.66
License: GPLv2
Group: System Environment/Base
Release: 1%{?dist}
@@ -17,6 +17,7 @@ Requires: ipcalc
Conflicts: systemd < 216-3
Conflicts: lvm2 < 2.02.98-3
Conflicts: dmraid < 1.0.0.rc16-18
+Conflicts: policycoreutils < 2.5-6
Requires: systemd
Requires: iproute, /sbin/arping, findutils
# Not strictly required, but nothing else requires it
@@ -176,6 +177,24 @@ fi
%{_sysconfdir}/profile.d/debug*
%changelog
+* Mon Apr 25 2016 Lukáš Nykrýn <lnykryn@redhat.com> - 9.66-1
+- remove autorelabel stuff
+- autorelabel: turn quota off before relabeling
+- network: Treat other tunnel interfaces, fixes ifdown stage
+- autorelabel: call dracut-initramfs-restore before forced reboot
+- sysconfig.txt: document PPPOE_EXTRA and PPPD_EXTRA
+- ifdown-eth: fix comparison
+
+* Mon Dec 07 2015 Lukáš Nykrýn <lnykryn@redhat.com> - 9.65-1
+- init.d/functions: end with 0
+- fedora-loadmodules: we don't have readahead anymore
+- network-scripts: DEVICE and HWADRR could be quoted by apostrophe
+- ifup-wireless: fix calling of phy_wireless_device
+- ifdown: clean ipv4 localhost addresses
+- ifup-eth: some bridge options are applied later
+- service: improve status and stop function for daemon with intscripts
+- init.d/functions: reload systemd if it can't see an initscript
+
* Thu Aug 06 2015 Lukáš Nykrýn <lnykryn@redhat.com> - 9.64-1
- network-functions: fix wireless detection
- fedora-readonly: use --make-slave with --bind mounts
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index fdf58bd0..ddb89cd5 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -57,6 +57,10 @@ systemctl_redirect () {
options="$options --no-block"
fi
+ if systemctl show -p LoadState "$prog.service" | grep -q 'not-found' ; then
+ action $"Reloading systemd: " /bin/systemctl daemon-reload
+ fi
+
action "$s" /bin/systemctl $options $command "$prog.service"
}
@@ -480,7 +484,14 @@ status() {
if [ "$_use_systemctl" = "1" ]; then
systemctl status ${0##*/}.service
- return $?
+ ret=$?
+ # LSB daemons that dies abnormally in systemd looks alive in systemd's eyes due to RemainAfterExit=yes
+ # lets adjust the reality a little bit
+ if systemctl show -p ActiveState ${0##*/}.service | grep -q '=active$' && \
+ systemctl show -p SubState ${0##*/}.service | grep -q '=exited$' ; then
+ ret=3
+ fi
+ return $ret
fi
# First try "pidof"
@@ -702,4 +713,5 @@ if [ "$_use_systemctl" = "1" ]; then
fi
strstr "$(cat /proc/cmdline)" "rc.debug" && set -x
+return 0
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 1bb9a167..6f6d4d8d 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -133,7 +133,7 @@ case "$1" in
bridgeinterfaces="$bridgeinterfaces $i"
continue
fi
- if [ "$TYPE" = "IPSEC" ]; then
+ if [ "$TYPE" = "IPSEC" ] || [ "$TYPE" = "IPIP" ] || [ "$TYPE" = "GRE" ]; then
vpninterfaces="$vpninterfaces $i"
continue
fi
@@ -215,7 +215,7 @@ case "$1" in
vpninterfaces="$vpninterfaces $i"
continue
fi
- if [ "$TYPE" = "IPSEC" ]; then
+ if [ "$TYPE" = "IPSEC" ] || [ "$TYPE" = "IPIP" ] || [ "$TYPE" = "GRE" ]; then
vpninterfaces="$vpninterfaces $i"
continue
fi
diff --git a/sysconfig.txt b/sysconfig.txt
index 72e48eda..56cde1b7 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -835,6 +835,8 @@ Files in /etc/sysconfig/network-scripts/
PPPOPTIONS=<arbitrary option string; is placed last on the
command line, so it can override other options like asyncmap
that were specified differently>
+ PPPOE_EXTRA = any extra arguments to pass to pppoe
+ PPPD_EXTRA = any extra arguments to pass to pppd
PAPNAME=<"name $PAPNAME" on pppd command line> (note that
the "remotename" option is always specified as the logical
ppp device name, like "ppp0" (which might perhaps be the
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 81e352df..2c011efa 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -60,7 +60,7 @@ fi
fi
if is_bonding_device ${DEVICE} ; then
- for device in $(LANG=C grep -l "^[[:space:]]*MASTER=\"\?${DEVICE}\"\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do
+ for device in $(LANG=C grep -l "^[[:space:]]*MASTER=['\"]\?${DEVICE}['\"]\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do
is_ignored_file "$device" && continue
/sbin/ifdown ${device##*/}
done
@@ -142,15 +142,15 @@ fi
# brought up. Flush all addresses associated with this
# instance instead.
if [ -d "/sys/class/net/${REALDEVICE}" ]; then
+ LABEL=
+ if [ "${REALDEVICE}" != "${DEVICE}" ]; then
+ LABEL="label ${DEVICE}"
+ fi
if [ "${REALDEVICE}" = "lo" ]; then
- SCOPE="host"
+ ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null
else
- SCOPE="global"
- fi
- if [ "${REALDEVICE}" = "${DEVICE}" ]; then
- ip addr flush dev ${REALDEVICE} scope ${SCOPE} 2>/dev/null
- else
- ip addr flush dev ${REALDEVICE} label ${DEVICE} scope ${SCOPE} 2>/dev/null
+ ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null
+ ip -4 addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null
fi
if [ "${SLAVE}" = "yes" -a -n "${MASTER}" ]; then
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index cc1afd78..1ecedcf4 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -76,7 +76,9 @@ if [ "${TYPE}" = "Bridge" ]; then
for arg in $BRIDGING_OPTS ; do
key=${arg%%=*};
value=${arg##*=};
- echo $value > /sys/class/net/${DEVICE}/bridge/$key
+ if [ "${key}" != "multicast_router" -a "${key}" != "hash_max" -a "${key}" != "multicast_snooping" ]; then
+ echo $value > /sys/class/net/${DEVICE}/bridge/$key
+ fi
done
# set LINKDELAY (used as timeout when calling check_link_down())
# to at least (${DELAY} * 2) + 7 if STP is enabled. This is the
@@ -205,7 +207,7 @@ fi
if [ "$ISALIAS" = no ] && is_bonding_device ${DEVICE} ; then
install_bonding_driver ${DEVICE}
/sbin/ip link set dev ${DEVICE} up
- for device in $(LANG=C grep -l "^[[:space:]]*MASTER=\"\?${DEVICE}\"\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do
+ for device in $(LANG=C grep -l "^[[:space:]]*MASTER=['\"]\?${DEVICE}['\"]\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do
is_ignored_file "$device" && continue
/sbin/ifup ${device##*/} || net_log "Unable to start slave device ${device##*/} for master ${DEVICE}." warning
done
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 93593aba..3c0205f0 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -24,14 +24,14 @@ get_hwaddr ()
get_config_by_device ()
{
- LANG=C grep -l "^[[:space:]]*DEVICE=\"\?${1}\"\?\([[:space:]#]\|$\)" \
+ LANG=C grep -l "^[[:space:]]*DEVICE=['\"]\?${1}['\"]\?\([[:space:]#]\|$\)" \
/etc/sysconfig/network-scripts/ifcfg-* \
| LC_ALL=C sed -e "$__sed_discard_ignored_files"
}
get_config_by_hwaddr ()
{
- LANG=C grep -il "^[[:space:]]*HWADDR=\"\?${1}\"\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-* \
+ LANG=C grep -il "^[[:space:]]*HWADDR=['\"]\?${1}['\"]\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-* \
| LC_ALL=C sed -e "$__sed_discard_ignored_files"
}
diff --git a/systemd/fedora-autorelabel b/systemd/fedora-autorelabel
deleted file mode 100755
index 7cb9b40c..00000000
--- a/systemd/fedora-autorelabel
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-#
-# Do automatic relabelling
-#
-
-. /etc/init.d/functions
-
-relabel_selinux() {
- # if /sbin/init is not labeled correctly this process is running in the
- # wrong context, so a reboot will be required after relabel
- AUTORELABEL=
- . /etc/selinux/config
- echo "0" > /sys/fs/selinux/enforce
- [ -x /bin/plymouth ] && plymouth --hide-splash
-
- if [ "$AUTORELABEL" = "0" ]; then
- echo
- echo $"*** Warning -- SELinux ${SELINUXTYPE} policy relabel is required. "
- echo $"*** /etc/selinux/config indicates you want to manually fix labeling"
- echo $"*** problems. Dropping you to a shell; the system will reboot"
- echo $"*** when you leave the shell."
- sulogin
-
- else
- echo
- echo $"*** Warning -- SELinux ${SELINUXTYPE} policy relabel is required."
- echo $"*** Relabeling could take a very long time, depending on file"
- echo $"*** system size and speed of hard drives."
-
- FORCE=`cat /.autorelabel`
- /sbin/fixfiles $FORCE restore > /dev/null 2>&1
- fi
- rm -f /.autorelabel
- systemctl --force reboot
-}
-
-# Check to see if a full relabel is needed
-if [ "$READONLY" != "yes" ]; then
- restorecon $(awk '!/^#/ && $4 !~ /noauto/ && $2 ~ /^\// { print $2 }' /etc/fstab) >/dev/null 2>&1
- relabel_selinux
-fi
diff --git a/systemd/system/fedora-autorelabel-mark.service b/systemd/system/fedora-autorelabel-mark.service
deleted file mode 100644
index 33b5147b..00000000
--- a/systemd/system/fedora-autorelabel-mark.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Mark the need to relabel after reboot
-DefaultDependencies=no
-Requires=local-fs.target
-Conflicts=shutdown.target
-After=local-fs.target
-Before=sysinit.target shutdown.target
-ConditionSecurity=!selinux
-ConditionPathIsDirectory=/etc/selinux
-ConditionPathExists=!/.autorelabel
-
-[Service]
-ExecStart=-/bin/touch /.autorelabel
-Type=oneshot
-RemainAfterExit=yes
diff --git a/systemd/system/fedora-autorelabel.service b/systemd/system/fedora-autorelabel.service
deleted file mode 100644
index c98a40ff..00000000
--- a/systemd/system/fedora-autorelabel.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=Relabel all filesystems, if necessary
-DefaultDependencies=no
-Requires=local-fs.target
-Conflicts=shutdown.target
-After=local-fs.target
-Before=sysinit.target shutdown.target
-ConditionSecurity=selinux
-ConditionKernelCommandLine=|autorelabel
-ConditionPathExists=|/.autorelabel
-
-[Service]
-ExecStart=/lib/systemd/fedora-autorelabel
-Type=oneshot
-TimeoutSec=0
-RemainAfterExit=yes
-StandardInput=tty
diff --git a/systemd/system/fedora-loadmodules.service b/systemd/system/fedora-loadmodules.service
index cd2b4910..51285093 100644
--- a/systemd/system/fedora-loadmodules.service
+++ b/systemd/system/fedora-loadmodules.service
@@ -2,7 +2,6 @@
Description=Load legacy module configuration
DefaultDependencies=no
Conflicts=shutdown.target
-After=systemd-readahead-collect.service systemd-readahead-replay.service
Before=sysinit.target shutdown.target
ConditionPathExists=|/etc/rc.modules
ConditionDirectoryNotEmpty=|/etc/sysconfig/modules/