]>
Commit | Line | Data |
---|---|---|
e0d6b46c ER |
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 |