View Single Post
Old 11-01-2012, 01:09 AM   #18
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
And here is a basic upstart script for mounting/unmounting filesystem (described earlier):
Code:
start on started system and started syslog
stop on stopping filesystems

pre-start script
  source /etc/upstart/functions

  losetup -o 1075838976 /dev/loop/1 /dev/mmcblk0p4
  mount -t ext3 /dev/loop/1 /mnt/newpart
  
  f_log I newpart mount "newpart is mounted"
end script

post-stop script
  source /etc/upstart/functions

  umount /mnt/newpart
  losetup -d /dev/loop/1
  
  f_log I newpart umount "newpart is unmounted"
end script
It's really basic, if you'll use it as-is, expect some (rare?) ignored edge cases (can't imagine any example right now, though).
eureka is offline   Reply With Quote