Configuration: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Wulf (Diskussion | Beiträge) Die Seite wurde neu angelegt: „===Avoid hard drives spinning up by SSH Login=== The script '''/usr/lib/update-notifier/update-motd-fsck-at-reboot''' scans all drives to show in welcome messa…“ |
Wulf (Diskussion | Beiträge) |
||
| Zeile 1: | Zeile 1: | ||
===Avoid hard drives spinning up by SSH Login=== | ===Avoid hard drives spinning up by SSH Login=== | ||
The script '''/usr/lib/update-notifier/update-motd-fsck-at-reboot''' scans all drives to show in welcome message (motd) which of them will be checked for errors at the next reboot. | The script '''/usr/lib/update-notifier/update-motd-fsck-at-reboot''' scans all drives to show in welcome message (motd) which of them will be checked for errors at the next reboot. | ||
<syntaxhighlight lang="bash" highlight="10-14">#!/bin/sh | |||
# Authors: | |||
# Mads Chr. Olesen <mads@mchro.dk> | |||
# Kees Cook <kees@ubuntu.com> | |||
set -e | |||
# poor mans force | |||
if [ "$1" = "--force" ]; then | |||
NEEDS_FSCK_CHECK=yes | |||
#>>>2019-10-11 Frank Wulf | |||
# Exit script as otherwise it spins up hard drives during login | |||
else | |||
exit 0 | |||
#<<<2019-10-11 Frank Wulf | |||
fi | |||
... | |||
</syntaxhighlight> | |||
Version vom 13. Oktober 2019, 00:39 Uhr
Avoid hard drives spinning up by SSH Login
The script /usr/lib/update-notifier/update-motd-fsck-at-reboot scans all drives to show in welcome message (motd) which of them will be checked for errors at the next reboot.
#!/bin/sh
# Authors:
# Mads Chr. Olesen <mads@mchro.dk>
# Kees Cook <kees@ubuntu.com>
set -e
# poor mans force
if [ "$1" = "--force" ]; then
NEEDS_FSCK_CHECK=yes
#>>>2019-10-11 Frank Wulf
# Exit script as otherwise it spins up hard drives during login
else
exit 0
#<<<2019-10-11 Frank Wulf
fi
...