initscripts-9.38 released
by Bill Nottingham
Major changes:
- Support added to /sbin/service for running legacy nonstandard
SysV actions
This is done by packaging the action in
/usr/libexec/initscripts/legacy-actions/<script name>/<action>
- Move the default sysctl.conf file to /usr/lib/sysctl.d/00-system.conf
- More legacy /sbin/route removal. (The only remaining usage is in
/etc/init.d/network for legacy /etc/sysconfig/static-routes, and
this cannot be removed as the format is specific to /sbin/route.)
Assorted other fixes as well. Full log attached.
Bill
11 years, 10 months
[PATCH 1/3] Sync FSF address with current GPLv2.
by Ville Skyttä
---
po/xgettext_sh.py | 4 ++--
src/console_check.c | 4 ++--
src/console_init.c | 4 ++--
src/consoletype.c | 4 ++--
src/genhostid.c | 4 ++--
src/getkey.c | 4 ++--
src/ipcalc.c | 4 ++--
src/netreport.c | 4 ++--
src/ppp-watch.c | 4 ++--
src/securetty.c | 4 ++--
src/shvar.c | 4 ++--
src/shvar.h | 4 ++--
src/usernetctl.c | 4 ++--
src/usleep.c | 4 ++--
14 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/po/xgettext_sh.py b/po/xgettext_sh.py
index ac18593..167ed5e 100755
--- a/po/xgettext_sh.py
+++ b/po/xgettext_sh.py
@@ -15,8 +15,8 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Changelog
# Mon May 31 1999 Wanderlei Antonio Cavassin <cavassin(a)conectiva.com>
diff --git a/src/console_check.c b/src/console_check.c
index 688bff6..8d01d82 100644
--- a/src/console_check.c
+++ b/src/console_check.c
@@ -11,8 +11,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
diff --git a/src/console_init.c b/src/console_init.c
index 22083a8..446433d 100644
--- a/src/console_init.c
+++ b/src/console_init.c
@@ -11,8 +11,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
diff --git a/src/consoletype.c b/src/consoletype.c
index fb2a911..929969a 100644
--- a/src/consoletype.c
+++ b/src/consoletype.c
@@ -11,8 +11,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
diff --git a/src/genhostid.c b/src/genhostid.c
index 1b83d53..c7561c9 100644
--- a/src/genhostid.c
+++ b/src/genhostid.c
@@ -10,8 +10,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
diff --git a/src/getkey.c b/src/getkey.c
index 1149626..fdbeea1 100644
--- a/src/getkey.c
+++ b/src/getkey.c
@@ -11,8 +11,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* getkey
*
diff --git a/src/ipcalc.c b/src/ipcalc.c
index 8deccca..7316f05 100644
--- a/src/ipcalc.c
+++ b/src/ipcalc.c
@@ -11,8 +11,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Authors:
* Erik Troan <ewt(a)redhat.com>
diff --git a/src/netreport.c b/src/netreport.c
index a2b2625..31bfe2f 100644
--- a/src/netreport.c
+++ b/src/netreport.c
@@ -11,8 +11,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#include <errno.h>
diff --git a/src/ppp-watch.c b/src/ppp-watch.c
index 1fa8192..cbe3536 100644
--- a/src/ppp-watch.c
+++ b/src/ppp-watch.c
@@ -19,8 +19,8 @@
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
diff --git a/src/securetty.c b/src/securetty.c
index a4768e3..59abb6e 100644
--- a/src/securetty.c
+++ b/src/securetty.c
@@ -11,8 +11,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
diff --git a/src/shvar.c b/src/shvar.c
index 765a77e..9817d9a 100644
--- a/src/shvar.c
+++ b/src/shvar.c
@@ -23,8 +23,8 @@
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
diff --git a/src/shvar.h b/src/shvar.h
index 50d1068..46fb6b7 100644
--- a/src/shvar.h
+++ b/src/shvar.h
@@ -23,8 +23,8 @@
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#ifndef _SHVAR_H
diff --git a/src/usernetctl.c b/src/usernetctl.c
index f66cfeb..9e12760 100644
--- a/src/usernetctl.c
+++ b/src/usernetctl.c
@@ -11,8 +11,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
diff --git a/src/usleep.c b/src/usleep.c
index 0409498..a5e7d9d 100644
--- a/src/usleep.c
+++ b/src/usleep.c
@@ -15,8 +15,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
--
1.7.10.2
11 years, 10 months
[PATCH] service: add support for legacy custom actions
by Michal Schmidt
This adds support for legacy initscript actions such as
service iptables save
Packages wishing to provide legacy actions should install programs (probably
scripts, but could be binaries) named
/usr/lib/initscripts/legacy-actions/<service>/<action>
It should be emphasized that this feature is meant to be used only in packages
where compatibility of custom actions with previous releases is desired.
Adding of entirely new actions is discouraged. Useful tools should be
shipped by upstreams as programs in /usr/bin, not in distro-specific hacks.
https://bugzilla.redhat.com/show_bug.cgi?id=796663
---
Makefile | 1 +
initscripts.spec | 1 +
service | 14 ++++++++++----
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 3d1ae95..c1a8921 100644
--- a/Makefile
+++ b/Makefile
@@ -143,6 +143,7 @@ install:
ln -s rc.d/$$i $(ROOT)/etc/$$i; \
done
+ mkdir -p -m 755 $(ROOT)/usr/lib/initscripts/legacy-actions
syntax-check:
diff --git a/initscripts.spec b/initscripts.spec
index 55e2833..84fac05 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -299,6 +299,7 @@ rm -rf $RPM_BUILD_ROOT
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/crypttab
%dir /etc/tmpfiles.d
/etc/tmpfiles.d/initscripts.conf
+%dir %{_prefix}/lib/initscripts/legacy-actions
%files legacy
%defattr(-,root,root)
diff --git a/service b/service
index 2e2d4ea..4585f71 100755
--- a/service
+++ b/service
@@ -5,8 +5,10 @@
VERSION="$(basename $0) ver. 0.91"
USAGE="Usage: $(basename $0) < option > | --status-all | \
[ service_name [ command | --full-restart ] ]"
-SERVICE=
SERVICEDIR="/etc/init.d"
+ACTIONDIR="/usr/lib/initscripts/legacy-actions"
+SERVICE=
+ACTION=
OPTIONS=
if [ $# -eq 0 ]; then
@@ -58,6 +60,8 @@ while [ $# -gt 0 ]; do
fi
elif [ -z "${SERVICE}" ]; then
SERVICE="${1}"
+ elif [ -z "${ACTION}" ]; then
+ ACTION="${1}"
else
OPTIONS="${OPTIONS} ${1}"
fi
@@ -67,8 +71,10 @@ while [ $# -gt 0 ]; do
done
if [ -f "${SERVICEDIR}/${SERVICE}" ]; then
- env -i PATH="$PATH" TERM="$TERM" SYSTEMCTL_IGNORE_DEPENDENCIES=${SYSTEMCTL_IGNORE_DEPENDENCIES} SYSTEMCTL_SKIP_REDIRECT=${SYSTEMCTL_SKIP_REDIRECT} "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
+ env -i PATH="$PATH" TERM="$TERM" SYSTEMCTL_IGNORE_DEPENDENCIES=${SYSTEMCTL_IGNORE_DEPENDENCIES} SYSTEMCTL_SKIP_REDIRECT=${SYSTEMCTL_SKIP_REDIRECT} "${SERVICEDIR}/${SERVICE}" ${ACTION} ${OPTIONS}
+elif [ -x "${ACTIONDIR}/${SERVICE}/${ACTION}" ]; then
+ env -i PATH="$PATH" TERM="$TERM" SYSTEMCTL_IGNORE_DEPENDENCIES=${SYSTEMCTL_IGNORE_DEPENDENCIES} SYSTEMCTL_SKIP_REDIRECT=${SYSTEMCTL_SKIP_REDIRECT} "${ACTIONDIR}/${SERVICE}/${ACTION}" ${OPTIONS}
else
- [ -c /dev/stderr ] && echo $"Redirecting to /bin/systemctl ${OPTIONS} ${SERVICE}.service" >/dev/stderr
- exec /bin/systemctl ${OPTIONS} ${SERVICE}.service
+ [ -c /dev/stderr ] && echo $"Redirecting to /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE}.service" >/dev/stderr
+ exec /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE}.service
fi
--
1.7.10.2
11 years, 10 months
[PATCH] Allow bridge names starting with a dash
by y@redhat.com
From: Dan Kenigsberg <danken(a)redhat.com>
Misguided people may name their bridge '-foo', with a leading dash.
Let us indulge them. It is better than showing the usage string of
brctl.
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
sysconfig/network-scripts/ifdown-eth | 4 ++--
sysconfig/network-scripts/ifup-eth | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 80b9954..2be4eb6 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -107,12 +107,12 @@ fi
if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then
/sbin/ip link set dev ${DEVICE} down
- /usr/sbin/brctl delif ${BRIDGE} ${DEVICE}
+ /usr/sbin/brctl delif -- ${BRIDGE} ${DEVICE}
# Upon removing a device from a bridge,
# it's necessary to make radvd reload its config
[ -r /var/run/radvd/radvd.pid ] && kill -HUP $(cat /var/run/radvd/radvd.pid)
if [ -d /sys/class/net/${BRIDGE}/brif ] && [ $(ls -1 /sys/class/net/${BRIDGE}/brif | wc -l) -eq 0 ]; then
- /usr/sbin/brctl delbr ${BRIDGE}
+ /usr/sbin/brctl delbr -- ${BRIDGE}
fi
fi
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 79669c0..3c88eb7 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -52,10 +52,10 @@ if [ "${TYPE}" = "Bridge" ]; then
exit 1
fi
if [ ! -d /sys/class/net/${DEVICE}/bridge ]; then
- /usr/sbin/brctl addbr ${DEVICE} || exit 1
+ /usr/sbin/brctl addbr -- ${DEVICE} || exit 1
fi
- [ -n "${DELAY}" ] && /usr/sbin/brctl setfd ${DEVICE} ${DELAY}
- [ -n "${STP}" ] && /usr/sbin/brctl stp ${DEVICE} ${STP}
+ [ -n "${DELAY}" ] && /usr/sbin/brctl setfd -- ${DEVICE} ${DELAY}
+ [ -n "${STP}" ] && /usr/sbin/brctl stp -- ${DEVICE} ${STP}
fi
# If the device is a tap device, create it with tunctl, if available.
@@ -147,7 +147,7 @@ fi
# If the device is part of a bridge, add the device to the bridge
if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then
if [ ! -d /sys/class/net/${BRIDGE}/bridge ]; then
- /usr/sbin/brctl addbr ${BRIDGE} 2>/dev/null
+ /usr/sbin/brctl addbr -- ${BRIDGE} 2>/dev/null
fi
/sbin/ip addr flush dev ${DEVICE} 2>/dev/null
/sbin/ip link set dev ${DEVICE} up
@@ -155,7 +155,7 @@ if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then
/sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS
fi
[ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
- /usr/sbin/brctl addif ${BRIDGE} ${DEVICE}
+ /usr/sbin/brctl addif -- ${BRIDGE} ${DEVICE}
# Upon adding a device to a bridge,
# it's necessary to make radvd reload its config
[ -r /var/run/radvd/radvd.pid ] && kill -HUP $(cat /var/run/radvd/radvd.pid)
--
1.7.7.6
11 years, 10 months