wie bilde ich denn folgendes Szenario korrekt unter systemd nach?
Code: Alles auswählen
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=... / ext2 noatime,errors=remount-ro 0 1
tmpfs /tmp tmpfs noatime 0 0
tmpfs /var/lock tmpfs noatime 0 0
tmpfs /var/log tmpfs noatime 0 0
tmpfs /var/run tmpfs noatime 0 0
tmpfs /var/spool tmpfs noatime 0 0
tmpfs /var/tmp tmpfs noatime 0 0
tmpfs /var/www tmpfs noatime 0 0
Code: Alles auswählen
#! /bin/sh
### BEGIN INIT INFO
# Provides: flashupdown
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Start-Before: cron lighttpd $syslog
# X-Stop-After: cron lighttpd $syslog
### END INIT INFO
. /lib/lsb/init-functions
case "$1" in
start)
log_begin_msg "Uncompressing log/spool/www files from flash card to tmpfs..."
tar xfz /var/var_compressed/log.tar.gz -C /
tar xfz /var/var_compressed/spool.tar.gz -C /
tar xfz /var/var_compressed/www.tar.gz -C /
log_end_msg 0
;;
stop)
log_begin_msg "Compressing log/spool/www files from tmpfs to flash card..."
tar cfz /var/var_compressed/log.tar.gz --directory=/ var/log/
tar cfz /var/var_compressed/spool.tar.gz --directory=/ var/spool/
tar cfz /var/var_compressed/www.tar.gz --directory=/ var/www/
log_end_msg 0
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
Leider fliegt mir der Kram auch nach einem halben vertrödelten Wochenende stetig um die Ohren: Mount-Targets Failure hier, Dependency Error da, Emergency Console, journalctl sagt gar nichts, D-BUS Error, selbst Reboot geht nicht weil Daemon nicht läuft, bla blubb.
(Auf wievielen Sachen hat dieser systemd-Kram seine Finger eigentlich mittlerweile drauf? Darf man heutzutage überhaupt noch selbst irgendwas anpacken und entsprechend der eigenen Bedürfnisse modifizieren, ohne dass irgendwelche undurchsichtigen Automatismen den Geist aufgeben? )