Hallo Leute
Ich arbeite mit einem vollverschlüsselten Dualbootsystem auf meinem Notebook. Das bedeutet ich habe 5 Partitionen Boot, Windows (Truecrypt), Austausch (Truecrypt), Erweiterte Partition [Ubuntu (dm-crypt), Swap (dm-crypt)].
Das funktioniert insoweit auch gut. Nun habe ich mir ein init Script gebastelt, dass die Austauschpartition automatisch beim Start einhängen und die Verzeichnisse in meinem Homeordner automatisch mappen soll. Das habe ich früher immer durch Gnome erledigen lassen, aber da ein paar weitere Funktionen hinzugekommen sind, musste ich nun auf init wechseln.
Init-Script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #! /bin/sh ### BEGIN INIT INFO # Provides: Environment Starter # Required-Start: # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts the Environment and syncs the Web Development Area ### END INIT INFO # Author: rootLogin <********> # Aktionen case "$1" in start) /usr/bin/truecrypt /dev/sda4 --force --keyfiles=******** /media/austausch /bin/mount -o bind /media/austausch/Bilder /home/simon/Bilder /bin/mount -o bind /media/austausch/Dokumente /home/simon/Dokumente /bin/mount -o bind /media/austausch/Downloads /home/simon/Downloads /bin/mount -o bind /media/austausch/Musik /home/simon/Musik /bin/mount -o bind /media/austausch/Videos /home/simon/Videos /bin/mount -o bind /media/austausch/Programme /home/simon/Programme /usr/bin/rsync -a --delete /media/austausch/Radio2/ /home/simon/.radio2/ /bin/chmod -R 0755 /home/simon/.radio2 /bin/chmod -R 0777 /home/simon/.radio2/log /bin/chmod -R 0777 /home/simon/.radio2/covers /bin/chmod -R 0777 /home/simon/.radio2/media /bin/chmod -R 0777 /home/simon/.radio2/tmp /bin/mount -o bind /home/simon/.radio2 /var/radio2 ;; stop) /bin/umount /home/simon/Bilder /bin/umount /home/simon/Dokumente /bin/umount /home/simon/Downloads /bin/umount /home/simon/Musik /bin/umount /home/simon/Videos /bin/umount /home/simon/Programme /bin/umount /var/radio2 /usr/bin/rsync -a --delete /hom/simon/.radio2/ /media/austausch/Radio2 /usr/bin/truecrypt -d /media/austausch ;; sync) /usr/bin/rsync -a --delete /home/simon/.radio2/ /media/austausch/Radio2 esac exit 0 |
Nun mein Problem ist, dass das Script beim Hochfahren nicht startet, obwohl ich es meiner Meinung nach mit update-rc.d korrekt verlinkt habe.
simon@simon-laptop:/etc/rc2.d$ sudo update-rc.d environment defaults 80 20 Adding system startup for /etc/init.d/environment ... /etc/rc0.d/K20environment -> ../init.d/environment /etc/rc1.d/K20environment -> ../init.d/environment /etc/rc6.d/K20environment -> ../init.d/environment /etc/rc2.d/S80environment -> ../init.d/environment /etc/rc3.d/S80environment -> ../init.d/environment /etc/rc4.d/S80environment -> ../init.d/environment /etc/rc5.d/S80environment -> ../init.d/environment
Wenn ich das Script manuell per start oder stop verwende funktioniert es tiptop. Aber ich habe keine Ahnung warum es nicht automatisch mitstartet.
Wäre ganz froh, wenn mir jemand helfen könnte.
Vielen Dank im Vorraus
Gruss rootLogin