]> git.pld-linux.org Git - packages/binfmt-detector.git/commitdiff
- upstart config
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 27 Jan 2011 21:49:49 +0000 (21:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  however seems the mountpoint is namespaced, i.e not visible outside upstart
  process

Changed files:
    binfmt-detector.upstart -> 1.1

binfmt-detector.upstart [new file with mode: 0644]

diff --git a/binfmt-detector.upstart b/binfmt-detector.upstart
new file mode 100644 (file)
index 0000000..3c1a9ac
--- /dev/null
@@ -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
This page took 0.031168 seconds and 4 git commands to generate.