aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-12-09 16:12:26 -0500
committerBill Nottingham <notting@redhat.com>2009-12-09 16:12:26 -0500
commit12dcbfe79bbc89b23f775bfd847eb53ec17b2971 (patch)
treede4e95b14ec6c0eb0b22450e70861e8c953cfeee
parent307e970174f12e4a808684151f132df1677c3999 (diff)
parent5df584569b80bb8977f181e16b0de47fb4df08f1 (diff)
downloadinitscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.tar
initscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.tar.gz
initscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.tar.bz2
initscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.tar.xz
initscripts-12dcbfe79bbc89b23f775bfd847eb53ec17b2971.zip
Merge branch 'upstart-0.6.0-branch'
-rw-r--r--Makefile4
-rw-r--r--README-init (renamed from README-event.d)2
-rw-r--r--event.d/console16
-rw-r--r--event.d/rc025
-rw-r--r--event.d/rc129
-rw-r--r--event.d/rc220
-rw-r--r--event.d/rc320
-rw-r--r--event.d/rc420
-rw-r--r--event.d/rc520
-rw-r--r--event.d/rc623
-rw-r--r--event.d/serial42
-rw-r--r--event.d/tty115
-rw-r--r--event.d/tty216
-rw-r--r--event.d/tty316
-rw-r--r--event.d/tty416
-rw-r--r--event.d/tty516
-rw-r--r--event.d/tty616
-rw-r--r--init/control-alt-delete.conf (renamed from event.d/control-alt-delete)0
-rw-r--r--init/plymouth-shutdown.conf (renamed from event.d/plymouth-shutdown)0
-rw-r--r--init/prefdm.conf (renamed from event.d/prefdm)2
-rw-r--r--init/quit-plymouth.conf (renamed from event.d/quit-plymouth)5
-rw-r--r--init/rc.conf14
-rw-r--r--init/rcS-sulogin.conf (renamed from event.d/rcS-sulogin)5
-rw-r--r--init/rcS.conf (renamed from event.d/rcS)11
-rw-r--r--init/serial.conf25
-rw-r--r--init/start-ttys.conf15
-rw-r--r--init/tty.conf9
-rw-r--r--initscripts.spec16
-rw-r--r--inittab.upstart12
-rw-r--r--po/Makefile2
-rwxr-xr-xrc.d/init.d/halt3
-rwxr-xr-xrc.d/rc8
-rw-r--r--src/console_check.c5
-rw-r--r--sysconfig.txt3
-rw-r--r--sysconfig/init2
-rw-r--r--sysconfig/init.s3902
36 files changed, 104 insertions, 351 deletions
diff --git a/Makefile b/Makefile
index 4de8e59a..c92ef2db 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ install:
cp -af rc.d/init.d $(ROOT)/etc/rc.d/
install -m644 sysconfig/debug sysconfig/init sysconfig/netconsole sysconfig/readonly-root $(ROOT)/etc/sysconfig/
cp -af sysconfig/network-scripts $(ROOT)/etc/sysconfig/
- cp -af ppp NetworkManager event.d $(ROOT)/etc
+ cp -af ppp NetworkManager init $(ROOT)/etc
mkdir -p $(ROOT)/etc/ppp/peers
mkdir -p $(ROOT)/lib
cp -af udev $(ROOT)/lib
@@ -59,7 +59,7 @@ install:
chmod 755 $(ROOT)/etc/sysconfig/network-scripts/init*
chmod 755 $(ROOT)/etc/sysconfig/network-scripts/net.hotplug
chmod 755 $(ROOT)/etc/NetworkManager/dispatcher.d/00-netreport
- chmod 644 $(ROOT)/etc/event.d/*
+ chmod 644 $(ROOT)/etc/init/*
mkdir -p $(ROOT)/etc/sysconfig/modules
mkdir -p $(ROOT)/etc/sysconfig/networking/devices
mkdir -p $(ROOT)/etc/sysconfig/networking/profiles/default
diff --git a/README-event.d b/README-init
index ea60fbce..9a9b4cfa 100644
--- a/README-event.d
+++ b/README-init
@@ -1,4 +1,4 @@
-The upstart scripts in /etc/event.d originate from event-compat-sysv-0.3.9,
+The upstart scripts in /etc/init originate from event-compat-sysv-0.3.9,
and have since been heavily modified.
The original copyright is:
diff --git a/event.d/console b/event.d/console
deleted file mode 100644
index 732a3fa9..00000000
--- a/event.d/console
+++ /dev/null
@@ -1,16 +0,0 @@
-# console - getty
-#
-# This service maintains a getty on console from the point the system is
-# started until it is shut down again.
-
-start on stopped rc2
-start on stopped rc3
-start on stopped rc4
-start on started prefdm
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /sbin/mingetty console
diff --git a/event.d/rc0 b/event.d/rc0
deleted file mode 100644
index 11ce5a51..00000000
--- a/event.d/rc0
+++ /dev/null
@@ -1,25 +0,0 @@
-# rc0 - runlevel 0 compatibility
-#
-# This task runs the old sysv-rc runlevel 0 ("halt/poweroff") scripts with
-# the decision as to whether to halt or power off the system left up to the
-# script (and thus /etc/default/poweroff).
-
-start on runlevel 0
-
-stop on runlevel [!0]
-
-console output
-script
- set $(runlevel || true)
- if [ "$2" != "0" ] && [ "$2" != "6" ]; then
- set $(runlevel --set 0 || true)
- fi
-
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/rc.d/rc 0
-end script
diff --git a/event.d/rc1 b/event.d/rc1
deleted file mode 100644
index 38397b31..00000000
--- a/event.d/rc1
+++ /dev/null
@@ -1,29 +0,0 @@
-# rc1 - runlevel 1 compatibility
-#
-# This task runs the old sysv-rc runlevel 1 ("single-user") scripts.
-# /etc/rc.d/rc 1 will run the /etc/rc.d/rc1.d scripts.
-# telinit S will run whichever task has "start on runlevel S",
-# normally /etc/event.d/rcS-sulogin
-
-start on runlevel 1
-
-stop on runlevel [!1]
-
-console output
-script
- set $(runlevel --set 1 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/rc.d/rc 1
-end script
-post-stop script
- clear
- TEXTDOMAIN=initscripts
- . /etc/profile.d/lang.sh 2>/dev/null
- echo $"Telling INIT to go to single user mode."
- exec telinit S
-end script
diff --git a/event.d/rc2 b/event.d/rc2
deleted file mode 100644
index 6cc4d884..00000000
--- a/event.d/rc2
+++ /dev/null
@@ -1,20 +0,0 @@
-# rc2 - runlevel 2 compatibility
-#
-# This task runs the old sysv-rc runlevel 2 ("multi-user") scripts. It
-# is usually started by the telinit compatibility wrapper.
-
-start on runlevel 2
-
-stop on runlevel [!2]
-
-console output
-script
- set $(runlevel --set 2 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/rc.d/rc 2
-end script
diff --git a/event.d/rc3 b/event.d/rc3
deleted file mode 100644
index 47a4a639..00000000
--- a/event.d/rc3
+++ /dev/null
@@ -1,20 +0,0 @@
-# rc3 - runlevel 3 compatibility
-#
-# This task runs the old sysv-rc runlevel 3 (user defined) scripts. It
-# is usually started by the telinit compatibility wrapper.
-
-start on runlevel 3
-
-stop on runlevel [!3]
-
-console output
-script
- set $(runlevel --set 3 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/rc.d/rc 3
-end script
diff --git a/event.d/rc4 b/event.d/rc4
deleted file mode 100644
index 8e079f0e..00000000
--- a/event.d/rc4
+++ /dev/null
@@ -1,20 +0,0 @@
-# rc4 - runlevel 4 compatibility
-#
-# This task runs the old sysv-rc runlevel 4 (user defined) scripts. It
-# is usually started by the telinit compatibility wrapper.
-
-start on runlevel 4
-
-stop on runlevel [!4]
-
-console output
-script
- set $(runlevel --set 4 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/rc.d/rc 4
-end script
diff --git a/event.d/rc5 b/event.d/rc5
deleted file mode 100644
index 0ef6a400..00000000
--- a/event.d/rc5
+++ /dev/null
@@ -1,20 +0,0 @@
-# rc5 - runlevel 5 compatibility
-#
-# This task runs the old sysv-rc runlevel 5 (user defined) scripts. It
-# is usually started by the telinit compatibility wrapper.
-
-start on runlevel 5
-
-stop on runlevel [!5]
-
-console output
-script
- set $(runlevel --set 5 || true)
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/rc.d/rc 5
-end script
diff --git a/event.d/rc6 b/event.d/rc6
deleted file mode 100644
index f9df8b4a..00000000
--- a/event.d/rc6
+++ /dev/null
@@ -1,23 +0,0 @@
-# rc6 - runlevel 6 compatibility
-#
-# This task runs the old sysv-rc runlevel 6 ("reboot") scripts.
-
-start on runlevel 6
-
-stop on runlevel [!6]
-
-console output
-script
- set $(runlevel || true)
- if [ "$2" != "0" ] && [ "$2" != "6" ]; then
- set $(runlevel --set 6 || true)
- fi
-
- if [ "$1" != "unknown" ]; then
- PREVLEVEL=$1
- RUNLEVEL=$2
- export PREVLEVEL RUNLEVEL
- fi
-
- exec /etc/rc.d/rc 6
-end script
diff --git a/event.d/serial b/event.d/serial
deleted file mode 100644
index 660e93bd..00000000
--- a/event.d/serial
+++ /dev/null
@@ -1,42 +0,0 @@
-# Automatically start a configured serial console
-#
-# How this works:
-#
-# On boot, a udev helper examines /dev/console. If a serial console is the
-# primary console (last console on the commandline in grub), the event
-# 'fedora.serial-console-available <port name> <speed>' is emitted, which
-# triggers this script. It waits for the runlevel to finish, ensures
-# the proper port is in /etc/securetty, and starts the getty.
-#
-# If your serial console is not the primary console, or you want a getty
-# on serial even if it's not the console, create your own event by copying
-# /etc/event.d/tty[2-6], and changing the getty line in that file.
-
-start on fedora.serial-console-available *
-stop on runlevel [016]
-
-instance
-pre-start script
- while /bin/true ; do
- LANG=C /sbin/initctl status rcS | grep -wq "rcS (stop) waiting" && break
- sleep 1
- done
- while /bin/true ; do
- runlevel=$(/sbin/runlevel | /bin/awk '{ print $2 }')
- case "$runlevel" in
- 2|3|4|5)
- LANG=C /sbin/initctl status rc$runlevel | grep -wq "rc$runlevel (stop) waiting" && break
- ;;
- *)
- ;;
- esac
- sleep 1
- done
- /sbin/securetty $1
-end script
-exec /sbin/agetty /dev/$1 $2 vt100-nav
-post-stop script
- if [ "$UPSTART_EVENT" != "${UPSTART_EVENT##fedora.serial-console-available}" ]; then
- initctl emit --no-wait fedora.serial-console-available $1 $2
- fi
-end script
diff --git a/event.d/tty1 b/event.d/tty1
deleted file mode 100644
index 7747d660..00000000
--- a/event.d/tty1
+++ /dev/null
@@ -1,15 +0,0 @@
-# tty1 - getty
-#
-# This service maintains a getty on tty1 from the point the system is
-# started until it is shut down again.
-
-start on stopped rc2
-start on stopped rc3
-start on stopped rc4
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /sbin/mingetty tty1
diff --git a/event.d/tty2 b/event.d/tty2
deleted file mode 100644
index ec5f94cd..00000000
--- a/event.d/tty2
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty2 - getty
-#
-# This service maintains a getty on tty2 from the point the system is
-# started until it is shut down again.
-
-start on stopped rc2
-start on stopped rc3
-start on stopped rc4
-start on started prefdm
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /sbin/mingetty tty2
diff --git a/event.d/tty3 b/event.d/tty3
deleted file mode 100644
index ed95fdcf..00000000
--- a/event.d/tty3
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty3 - getty
-#
-# This service maintains a getty on tty3 from the point the system is
-# started until it is shut down again.
-
-start on stopped rc2
-start on stopped rc3
-start on stopped rc4
-start on started prefdm
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /sbin/mingetty tty3
diff --git a/event.d/tty4 b/event.d/tty4
deleted file mode 100644
index 76b6d717..00000000
--- a/event.d/tty4
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty4 - getty
-#
-# This service maintains a getty on tty4 from the point the system is
-# started until it is shut down again.
-
-start on stopped rc2
-start on stopped rc3
-start on stopped rc4
-start on started prefdm
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /sbin/mingetty tty4
diff --git a/event.d/tty5 b/event.d/tty5
deleted file mode 100644
index 9e9d8137..00000000
--- a/event.d/tty5
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty5 - getty
-#
-# This service maintains a getty on tty5 from the point the system is
-# started until it is shut down again.
-
-start on stopped rc2
-start on stopped rc3
-start on stopped rc4
-start on started prefdm
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /sbin/mingetty tty5
diff --git a/event.d/tty6 b/event.d/tty6
deleted file mode 100644
index 7eb42c01..00000000
--- a/event.d/tty6
+++ /dev/null
@@ -1,16 +0,0 @@
-# tty6 - getty
-#
-# This service maintains a getty on tty6 from the point the system is
-# started until it is shut down again.
-
-start on stopped rc2
-start on stopped rc3
-start on stopped rc4
-start on started prefdm
-
-stop on runlevel 0
-stop on runlevel 1
-stop on runlevel 6
-
-respawn
-exec /sbin/mingetty tty6
diff --git a/event.d/control-alt-delete b/init/control-alt-delete.conf
index 35cb1305..35cb1305 100644
--- a/event.d/control-alt-delete
+++ b/init/control-alt-delete.conf
diff --git a/event.d/plymouth-shutdown b/init/plymouth-shutdown.conf
index d76dbd3f..d76dbd3f 100644
--- a/event.d/plymouth-shutdown
+++ b/init/plymouth-shutdown.conf
diff --git a/event.d/prefdm b/init/prefdm.conf
index 7098bd76..d47356c7 100644
--- a/event.d/prefdm
+++ b/init/prefdm.conf
@@ -2,7 +2,7 @@
#
# Starts gdm/xdm/etc by preference
-start on stopped rc5
+start on stopped rc RUNLEVEL=5
stop on runlevel [!5]
diff --git a/event.d/quit-plymouth b/init/quit-plymouth.conf
index 13ac3880..8b2e6f6a 100644
--- a/event.d/quit-plymouth
+++ b/init/quit-plymouth.conf
@@ -5,10 +5,7 @@
# this completes before the getty starts.
# prefdm handles quit differently, though.
-start on runlevel S
-start on stopping rc2
-start on stopping rc3
-start on stopping rc4
+start on runlevel S or stopping rc RUNLEVEL=[234]
script
/usr/bin/plymouth quit || :
diff --git a/init/rc.conf b/init/rc.conf
new file mode 100644
index 00000000..e7285e47
--- /dev/null
+++ b/init/rc.conf
@@ -0,0 +1,14 @@
+# rc - System V runlevel compatibility
+#
+# This task runs the old sysv-rc runlevel scripts. It
+# is usually started by the telinit compatibility wrapper.
+
+start on runlevel [0123456]
+
+stop on runlevel [!$RUNLEVEL]
+
+task
+
+export RUNLEVEL
+console output
+exec /etc/rc.d/rc $RUNLEVEL
diff --git a/event.d/rcS-sulogin b/init/rcS-sulogin.conf
index d3aa20d1..4f1f1f13 100644
--- a/event.d/rcS-sulogin
+++ b/init/rcS-sulogin.conf
@@ -5,16 +5,15 @@
start on runlevel S
-stop on runlevel
+stop on runlevel [!S]
console owner
script
- runlevel --set S >/dev/null || true
plymouth --hide-splash || true
exec /bin/bash
end script
post-stop script
- if [ "$1" = "S" ]; then
+ if [ "$RUNLEVEL" = "S" ]; then
runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
[ -z "$runlevel" ] && runlevel="3"
exec telinit $runlevel
diff --git a/event.d/rcS b/init/rcS.conf
index 1c0a54be..51d52312 100644
--- a/event.d/rcS
+++ b/init/rcS.conf
@@ -6,18 +6,15 @@ start on startup
stop on runlevel
+task
+
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/rc.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
-script
- runlevel --set S >/dev/null || true
-
- /etc/rc.d/rc.sysinit
- runlevel --reboot || true
-end script
+exec /etc/rc.d/rc.sysinit
post-stop script
- if [ "$UPSTART_EVENT" = "startup" ]; then
+ if [ "$UPSTART_EVENTS" = "startup" ]; then
runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
[ -z "$runlevel" ] && runlevel="3"
for t in $(cat /proc/cmdline); do
diff --git a/init/serial.conf b/init/serial.conf
new file mode 100644
index 00000000..21aab580
--- /dev/null
+++ b/init/serial.conf
@@ -0,0 +1,25 @@
+# Automatically start a configured serial console
+#
+# How this works:
+#
+# On boot, a udev helper examines /dev/console. If a serial console is the
+# primary console (last console on the commandline in grub), the event
+# 'fedora.serial-console-available <port name> <speed>' is emitted, which
+# triggers this script. It waits for the runlevel to finish, ensures
+# the proper port is in /etc/securetty, and starts the getty.
+#
+# If your serial console is not the primary console, or you want a getty
+# on serial even if it's not the console, create your own event by copying
+# /etc/init/tty.conf, and changing the getty line in that file.
+
+start on fedora.serial-console-available DEV=* and stopped rc RUNLEVEL=[2345]
+stop on runlevel [016]
+
+instance $DEV
+pre-start exec /sbin/securetty $DEV
+exec /sbin/agetty /dev/$DEV $SPEED vt100-nav
+post-stop script
+ if [ "$UPSTART_EVENTS" != "${UPSTART_EVENTS##fedora.serial-console-available}" ]; then
+ initctl emit --no-wait fedora.serial-console-available DEV=$DEV SPEED=$SPEED
+ fi
+end script
diff --git a/init/start-ttys.conf b/init/start-ttys.conf
new file mode 100644
index 00000000..1528cf4b
--- /dev/null
+++ b/init/start-ttys.conf
@@ -0,0 +1,15 @@
+#
+# This service starts the configured number of gettys.
+
+start on stopped rc RUNLEVEL=[2345]
+
+env ACTIVE_CONSOLES=/dev/tty[1-6]
+env X_TTY=/dev/tty1
+task
+script
+ . /etc/sysconfig/init
+ for tty in $(echo $ACTIVE_CONSOLES) ; do
+ [ "$RUNLEVEL" = "5" -a "$tty" = "$X_TTY" ] && continue
+ initctl start tty TTY=$tty
+ done
+end script
diff --git a/init/tty.conf b/init/tty.conf
new file mode 100644
index 00000000..251e1139
--- /dev/null
+++ b/init/tty.conf
@@ -0,0 +1,9 @@
+# tty - getty
+#
+# This service maintains a getty on the sepcified device.
+
+stop on runlevel [016]
+
+respawn
+instance $TTY
+exec /sbin/mingetty $TTY
diff --git a/initscripts.spec b/initscripts.spec
index 478d8420..c5f404e3 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -19,7 +19,7 @@ Requires: util-linux-ng >= 2.16, mount >= 2.11l
Requires: bash >= 3.0
Requires: sysvinit-tools >= 2.87
%if with_upstart
-Requires: upstart
+Requires: upstart >= 0.6.0
%else
Requires: SysVinit >= 2.85-38
%endif
@@ -75,11 +75,9 @@ make ROOT=$RPM_BUILD_ROOT SUPERUSER=`id -un` SUPERGROUP=`id -gn` mandir=%{_mandi
%if with_upstart
mv -f $RPM_BUILD_ROOT/etc/inittab.upstart $RPM_BUILD_ROOT/etc/inittab
- rm -f $RPM_BUILD_ROOT/etc/rc.d/rc1.d/S99single
- rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/single
%else
mv -f $RPM_BUILD_ROOT/etc/inittab.sysv $RPM_BUILD_ROOT/etc/inittab
- rm -rf $RPM_BUILD_ROOT/etc/event.d
+ rm -rf $RPM_BUILD_ROOT/etc/init
%endif
rm -f $RPM_BUILD_ROOT/etc/inittab.*
@@ -87,13 +85,11 @@ rm -f $RPM_BUILD_ROOT/etc/inittab.*
rm -f \
$RPM_BUILD_ROOT/etc/sysconfig/network-scripts/ifup-ctc \
$RPM_BUILD_ROOT/lib/udev/rules.d/55-ccw.rules \
- $RPM_BUILD_ROOT/lib/udev/ccw_init \
- $RPM_BUILD_ROOT/etc/event.d/console
+ $RPM_BUILD_ROOT/lib/udev/ccw_init
%else
rm -f \
$RPM_BUILD_ROOT/etc/rc.d/rc.sysinit.s390init \
- $RPM_BUILD_ROOT/etc/sysconfig/init.s390 \
- $RPM_BUILD_ROOT/etc/event.d/tty[1-6]
+ $RPM_BUILD_ROOT/etc/sysconfig/init.s390
%endif
%pre
@@ -182,7 +178,7 @@ rm -rf $RPM_BUILD_ROOT
/etc/statetab
%dir /etc/statetab.d
%if with_upstart
-%config(noreplace) /etc/event.d/*
+/etc/init/*
%endif
%config /etc/X11/prefdm
%config(noreplace) /etc/inittab
@@ -235,7 +231,7 @@ rm -rf $RPM_BUILD_ROOT
%dir /etc/NetworkManager/dispatcher.d
/etc/NetworkManager/dispatcher.d/00-netreport
/etc/NetworkManager/dispatcher.d/05-netfs
-%doc sysconfig.txt sysvinitfiles static-routes-ipv6 ipv6-tunnel.howto ipv6-6to4.howto changes.ipv6 COPYING README-event.d
+%doc sysconfig.txt sysvinitfiles static-routes-ipv6 ipv6-tunnel.howto ipv6-6to4.howto changes.ipv6 COPYING README-init
/var/lib/stateless
%ghost %attr(0600,root,utmp) /var/log/btmp
%ghost %attr(0664,root,utmp) /var/log/wtmp
diff --git a/inittab.upstart b/inittab.upstart
index 95d359ca..4d7a9a79 100644
--- a/inittab.upstart
+++ b/inittab.upstart
@@ -2,17 +2,17 @@
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
-# System initialization is started by /etc/event.d/rcS
+# System initialization is started by /etc/init/rcS
#
-# Individual runlevels are started by /etc/event.d/rc[0-6]
+# Individual runlevels are started by /etc/init/rc
#
-# Ctrl-Alt-Delete is handled by /etc/event.d/control-alt-delete
+# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete
#
-# Terminal gettys (tty[1-6]) are handled by /etc/event.d/tty[1-6] and
-# /etc/event.d/serial
+# Terminal gettys are handled by /etc/init/tty and /etc/init/serial,
+# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
-# upstart works, see init(8), initctl(8), and events(5).
+# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
diff --git a/po/Makefile b/po/Makefile
index 2ab3d028..439b18e4 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -12,7 +12,7 @@ FMTCATALOGS = $(patsubst %.po,%.mo,$(CATALOGS))
POTFILES = /etc/ppp/ip* /etc/rc.d/init.d/* /etc/rc.d/rc /etc/rc.d/rc.* \
$(shell ls /etc/sysconfig/network-scripts/* | grep -v ifcfg-) \
- /sbin/service /usr/sbin/sys-unconfig /etc/event.d/*
+ /sbin/service /usr/sbin/sys-unconfig /etc/event.d/* /etc/init/*
all: $(NLSPACKAGE).pot $(FMTCATALOGS)
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 5276246f..7144d3da 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -165,6 +165,9 @@ if [ -x /sbin/halt.local ]; then
/sbin/halt.local
fi
+# Tell init to re-exec itself.
+kill -TERM 1
+
# Remount read only anything that's left mounted.
# echo $"Remounting remaining filesystems readonly"
mount | awk '{ print $3 }' | while read line; do
diff --git a/rc.d/rc b/rc.d/rc
index d918b7c7..73d266ab 100755
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -65,9 +65,9 @@ for i in /etc/rc$runlevel.d/K* ; do
check_runlevel "$i" || continue
# Bring the subsystem down.
- [ -n "$UPSTART" ] && initctl emit --quiet stopping $subsys
+ [ -n "$UPSTART" ] && initctl emit --quiet stopping JOB=$subsys
$i stop
- [ -n "$UPSTART" ] && initctl emit --quiet stopped $subsys
+ [ -n "$UPSTART" ] && initctl emit --quiet stopped JOB=$subsys
done
# Now run the START scripts.
@@ -92,13 +92,13 @@ for i in /etc/rc$runlevel.d/S* ; do
update_boot_stage "$subsys"
# Bring the subsystem up.
- [ -n "$UPSTART" ] && initctl emit --quiet starting $subsys
+ [ -n "$UPSTART" ] && initctl emit --quiet starting JOB=$subsys
if [ "$subsys" = "halt" -o "$subsys" = "reboot" ]; then
export LC_ALL=C
exec $i start
fi
$i start
- [ -n "$UPSTART" ] && initctl emit --quiet started $subsys
+ [ -n "$UPSTART" ] && initctl emit --quiet started JOB=$subsys
done
[ "$do_confirm" = "yes" ] && rm -f /var/run/confirm
exit 0
diff --git a/src/console_check.c b/src/console_check.c
index 595012ff..35065479 100644
--- a/src/console_check.c
+++ b/src/console_check.c
@@ -152,9 +152,10 @@ out:
int emit_console_event(char *dev, int speed) {
char *args[] = { "initctl", "emit", "--no-wait", "fedora.serial-console-available", NULL, NULL, NULL };
- args[4] = dev;
+ if (dev)
+ asprintf(&args[4],"DEV=%s",dev);
if (speed)
- asprintf(&args[5],"%d",speed);
+ asprintf(&args[5],"SPEED=%d",speed);
execv("/sbin/initctl", args);
return 1;
}
diff --git a/sysconfig.txt b/sysconfig.txt
index 939798d6..582fb4d9 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -95,6 +95,9 @@ Generic options:
/etc/sysconfig/init:
+ ACTIVE_CONSOLES=<devices>
+ A list of devices to start gettys on on boot. This supports
+ shell-style globs.
BOOTUP=<some bootup mode>
BOOTUP=graphical means use X Windows graphical boot up
BOOTUP=color means colorized text mode boot display.
diff --git a/sysconfig/init b/sysconfig/init
index 5ccec5e6..959c4d83 100644
--- a/sysconfig/init
+++ b/sysconfig/init
@@ -21,3 +21,5 @@ LOGLEVEL=3
PROMPT=yes
# Set to 'yes' to allow probing for devices with swap signatures
AUTOSWAP=no
+# What ttys should gettys be started on?
+ACTIVE_CONSOLES=/dev/tty[1-6]
diff --git a/sysconfig/init.s390 b/sysconfig/init.s390
index 79955f07..121b38fc 100644
--- a/sysconfig/init.s390
+++ b/sysconfig/init.s390
@@ -19,3 +19,5 @@ SETCOLOR_NORMAL=
LOGLEVEL=3
# Set to anything other than 'no' to allow hotkey interactive startup...
PROMPT=no
+# What ttys should gettys be started on?
+ACTIVE_CONSOLES=/dev/console