- if [ ! -f /var/lock/subsys/binfmt-detector ]; then
- # check if binfmt_misc is not already mounted
- if ! /bin/mount | grep -q "${BINFMT_DIR} type binfmt_misc"; then
- /bin/mount none -t binfmt_misc ${BINFMT_DIR}
- fi
- msg_starting 'binfmt-detector'/proc/sys/fs/binfmt_misc
- echo ':windows:M::MZ::/usr/bin/binfmt-detector.sh:' > ${BINFMT_DIR}/register
- echo ':windowsPE:M::PE::/usr/bin/binfmt-detector.sh:' > ${BINFMT_DIR}/register
+ if [ -f /var/lock/subsys/binfmt-detector ]; then
+ msg_already_running "binfmt detector"
+ return
+ fi
+
+ # check if binfmt_misc is not already mounted
+ if ! grep -q ${BINFMT_DIR} /proc/mounts; then
+ /bin/mount none -t binfmt_misc ${BINFMT_DIR}
+ fi
+ msg_starting "binfmt detector"
+ if [ -e "$BINFMT_DIR/register" ]; then
+ echo ':windows:M::MZ::/usr/bin/binfmt-detector:' > ${BINFMT_DIR}/register
+ echo ':windowsPE:M::PE::/usr/bin/binfmt-detector:' > ${BINFMT_DIR}/register