Code: Select all
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: :::
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -o remount,rw /
::sysinit:/bin/mkdir -p /dev/pts /dev/shm
::sysinit:/bin/mount -a
::sysinit:/bin/mkdir -p /run/lock/subsys
::sysinit:/sbin/swapon -a
null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd
null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin
null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout
null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Put a getty on the serial port
tty1::respawn:/sbin/getty -L tty1 0 vt100 # GENERIC_SERIAL
# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
- init.d/rcK ausführen.
- alle Peripheriegeräte austauschen.
- alle Dateisysteme aushängen.
Code: Select all
#!/bin/sh
# Stop all init scripts in /etc/init.d
# executing them in reversed numerical order.
#
for i in $(ls -r /etc/init.d/S??*) ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set stop
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i stop
;;
esac
done
Code: Select all
S00iucode-tool S01syslogd S02klogd S02sysctl S21haveged S35iptables S40network S50crond S99system rcS
S01seedrng S02acpid S02modules S10udev S30dbus S40bluetoothd S44modem-manager S50sshd rcK
Ich würde diese Verzögerung gerne reduzieren, muss aber darauf achten, dass nach dem Neustart keine Daten beschädigt sind oder fehlen. Mein Prozess besteht beispielsweise darin, einige Textprotokolle und Telemetriedaten auf die Festplatte zu schreiben.
Ich kann /sbin/poweroff -f verwenden und die Verzögerung wird auf ~1 Sekunde reduziert, was großartig ist, aber ist es sicher? Es scheint, dass sync immer noch ?
heißt
Code: Select all
poweroff [-d delay] [-n] [-f]
Halt and shut off power
Options:
-d Delay interval for halting
-n No call to sync()
-f Force power off (don't go through init)
Was empfehlen Sie, um das Ausschalten des Boards zu beschleunigen?
Es ist das erste Mal, dass ich so etwas mache. Vielen Dank für jede Hilfe oder jeden Rat, den Sie mitbringen können!
Mobile version