Changeset 2727 in MondoRescue


Ignore:
Timestamp:
Feb 26, 2011, 12:05:33 PM (14 years ago)
Author:
Bruno Cornec
Message:
  • With mindi-busybox 1.18.3 the syntax of openvt changed. This patch keeps a compatible init script for both previous and current version.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/rootfs/sbin/init

    r2673 r2727  
    7272
    7373LaunchTerminals() {
    74     openvt 2 /bin/sh
    75     openvt 3 /bin/sh
    76     openvt 4 /bin/sh
    77     openvt 5 /bin/sh
    78     openvt 6 /bin/sh
    79     openvt 7 /bin/sh /sbin/wait-for-petris
    80     openvt 8 /usr/bin/tail -f $LOGFILE
     74    # Depending on busybox version, syntax of openvt is different
     75    /bin/busybox --help 2>&1 | head -1 | grep -Eq "1\.7\.3|1\.2\."
     76    if [ "$?" -eq "0" ] ; then
     77        opt=""
     78    else
     79        # 1.18.3 requires -c
     80        opt="-c"
     81    fi
     82    openvt $opt 2 /bin/sh
     83    openvt $opt 3 /bin/sh
     84    openvt $opt 4 /bin/sh
     85    openvt $opt 5 /bin/sh
     86    openvt $opt 6 /bin/sh
     87    openvt $opt 7 /bin/sh /sbin/wait-for-petris
     88    openvt $opt 8 /usr/bin/tail -f $LOGFILE
    8189    # May avoid shell error messages
    8290    chmod 666 /dev/tty* /dev/console
Note: See TracChangeset for help on using the changeset viewer.