Author: glen                         Date: Thu Jan 27 21:49:54 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- upstart config
  however seems the mountpoint is namespaced, i.e not visible outside upstart
  process

---- Files affected:
packages/binfmt-detector:
   binfmt-detector.upstart (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/binfmt-detector/binfmt-detector.upstart
diff -u /dev/null packages/binfmt-detector/binfmt-detector.upstart:1.1
--- /dev/null   Thu Jan 27 22:49:54 2011
+++ packages/binfmt-detector/binfmt-detector.upstart    Thu Jan 27 22:49:49 2011
@@ -0,0 +1,21 @@
+description    "Microsoft PE executable type detector"
+
+start on virtual-filesystems
+
+task
+
+env BINFMT_DIR="/proc/sys/fs/binfmt_misc"
+
+script
+       if ! grep -q ${BINFMT_DIR} /proc/mounts; then
+               /bin/mount none -t binfmt_misc ${BINFMT_DIR} || :
+       fi
+
+       echo ':windows:M::MZ::/usr/bin/binfmt-detector:' > 
${BINFMT_DIR}/register
+       echo ':windowsPE:M::PE::/usr/bin/binfmt-detector:' > 
${BINFMT_DIR}/register
+end script
+
+post-stop script
+       [ -f ${BINFMT_DIR}/windows ] && echo '-1' > ${BINFMT_DIR}/windows
+       [ -f ${BINFMT_DIR}/windowsPE ] && echo '-1' > ${BINFMT_DIR}/windowsPE
+end script
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to