Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
init-script verstaendnisfrage
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
kriz
Apprentice
Apprentice


Joined: 22 Jan 2003
Posts: 231

PostPosted: Sat May 02, 2009 12:56 pm    Post subject: init-script verstaendnisfrage Reply with quote

Code:

#!/sbin/runscript

depend() {
   need local
   need localmount
   after bootmisc
}

MOUNT_STICK="/home/%user/stick.sh -m"
UMOUNT_STICK="/home/%user/stick.sh -u"
MOUNT_SDC="/home/%user/daten.sh -m"
UMOUNT_SDC="/home/%user/daten.sh -u"

start() {
   ebegin "Starting crypted Partition to mount (dm-crypt)"
   $MOUNT_STICK && $MOUNT_SDC
   eend $?
}

stop() {
   ebegin "umount crypted Partition (dm-crypt)"
   $UMOUNT_SDC && $UMOUNT_STICK
   eend $?
}


damit mounte ich einen usbstick auf dem der key fuer die partition liegt.
dann wird nach dem passwort fuer den usbstick gefragt und die partition gemountet.
alles funktioniert wunderbar aber:
ist die form des script so in ordnung oder sollte man scripte aus scripten heraus anders starten?
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sat May 02, 2009 8:34 pm    Post subject: Reply with quote

theoretisch ist es so in Ordnung, vll sollten solche Veränderlichen Variablen in die entsprechende /etc/conf.d/ Datei eingetragen werden.
Aber letztlich gilt das du damit zurechtkommst.
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum