Mounthome
Zur Navigation springen
Zur Suche springen
In /usr/local/bin/mounthome:
#!/bin/bash if [ -e /home/info.txt ] then echo "Verschlüsselte Partition ist bereits eingebunden." sleep 1 else /sbin/cryptsetup luksOpen /media/daten/images/eeehome encimg /bin/mount /dev/mapper/encimg /home /bin/df -h | grep "home" echo "Eingabetaste drücken..." read fi
chmod +x /usr/local/bin/mounthome
XFCE in Xubuntu
Skript wird gestartet, wenn der Anmeldebildschirm erscheint.
In /etc/lightdm/lightdm.conf.d/10-xubuntu.conf:
greeter-setup-script=xterm -u8 -e /usr/local/bin/mounthome
SystemD beim Start
In /etc/systemd/system/mounthome.service:
[Unit] Description=Mount LUKS encrypted home partition After=network.target Before=systemd-logind.service getty@tty1.service [Service] Type=oneshot TTYPath=/dev/tty13 ExecStartPre=/usr/bin/chvt 13 ExecStart=/usr/local/bin/mounthome ExecStartPost=/usr/bin/chvt 1 TimeoutStartSec=0 StandardInput=tty TTYVHangup=yes TTYVTDisallocate=yes [Install] WantedBy=default.target RequiredBy=systemd-logind.service getty@tty1.service
Danach
systemctl enable mounthome