]> git.pld-linux.org Git - packages/binfmt-detector.git/commitdiff
- better version
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 29 Mar 2007 15:59:59 +0000 (15:59 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    binfmt-detector.init -> 1.7

binfmt-detector.init

index b1e8ed5df1d61bc3efad658808199bba2444dddf..8f5f7f4be9374c812a8c04af7c92c3ccc67c7662 100644 (file)
 
 BINFMT_DIR='/proc/sys/fs/binfmt_misc'
 
+[ ! -d "$BINFMT_DIR" ] && exit 0
+
 start() {
        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
+               if ! grep -q "${BINFMT_DIR}" /proc/mounts; 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
-               ok
-               touch /var/lock/subsys/binfmt-detector
+               msg_starting 'binfmt-detector'
+               if [ -e "$BINFMT_DIR/register" ]; then
+                       echo ':windows:M::MZ::/usr/bin/binfmt-detector.sh:' > ${BINFMT_DIR}/register
+                       echo ':windowsPE:M::PE::/usr/bin/binfmt-detector.sh:' > ${BINFMT_DIR}/register
+                       ok
+                       touch /var/lock/subsys/binfmt-detector
+               else
+                       fail
+               fi
        else
                msg_already_running 'binfmt-detector'
        fi
This page took 0.116662 seconds and 4 git commands to generate.