]> git.pld-linux.org Git - packages/binfmt-detector.git/blob - binfmt-detector.upstart
3c1a9ace8e424179373cf8c8cd22c40f57561494
[packages/binfmt-detector.git] / binfmt-detector.upstart
1 description     "Microsoft PE executable type detector"
2
3 start on virtual-filesystems
4
5 task
6
7 env BINFMT_DIR="/proc/sys/fs/binfmt_misc"
8
9 script
10         if ! grep -q ${BINFMT_DIR} /proc/mounts; then
11                 /bin/mount none -t binfmt_misc ${BINFMT_DIR} || :
12         fi
13
14         echo ':windows:M::MZ::/usr/bin/binfmt-detector:' > ${BINFMT_DIR}/register
15         echo ':windowsPE:M::PE::/usr/bin/binfmt-detector:' > ${BINFMT_DIR}/register
16 end script
17
18 post-stop script
19         [ -f ${BINFMT_DIR}/windows ] && echo '-1' > ${BINFMT_DIR}/windows
20         [ -f ${BINFMT_DIR}/windowsPE ] && echo '-1' > ${BINFMT_DIR}/windowsPE
21 end script
This page took 0.232033 seconds and 2 git commands to generate.