Skip to main content

Thread: Run Script on Statup


so i'm trying automatically mount truecrypt volume when start computer up. i've written real simple script, placed in init.d folder , run update-rc.d stuff.

script

code:
#!/bin/sh ### begin init info # provides:           # required-start:    truecrypt # required-stop:      # default-start:     s # default-stop:       # short-description: load encrypted volume # description:       mount data drive. ### end init info  . /lib/lsb/init-functions  set -e  case "$1" in   start)     truecrypt --password='my_pass_phrase' /dev/sda4 /media/data     ;;   stop)     truecrypt -d     ;;   restart|force-reload)     $0 stop     $0 start     ;; esac  exit 0
i've tried running in combinations of run levels. s, 2,3,5, etc. never load truecrypt volume.

if run command prompt once running works fine typing

code:
sudo /etc/init.d/myscript start
the drive loads , i'm happy.

doing wrong? i'm thinking has required-start part. i've tried "truecrypt" i've tried "$all" "$remote_fs" , whole bunch of other combinations.

put in nn 99 (so s99myscriptname after update-rc.d).

i'm misunderstanding this?? all

p.s. know i'm storing encryption passphrase in this, i'm not concerned various reasons long explain here.

quote posted nertskull view post
so i'm trying automatically mount truecrypt volume when start computer up. i've written real simple script, placed in init.d folder , run update-rc.d stuff.

...

case "$1" in
start)
truecrypt --password='my_pass_phrase' /dev/sda4 /media/data
;;

p.s. know i'm storing encryption passphrase in this, i'm not concerned various reasons long explain here.
hi,

init script, think problem of environment (path not set,
truecrypt command not found)

try put

/usr/bin/truecrypt --password ...

p.s: right: commenting password fact ... hope know doing

p.s2: way mount using pam (i use encfs in http://cloudusb.net but
think can work truecrypt too)

bye
giammy


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Run Script on Statup


Ubuntu

Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???