Changeset 43407


Ignore:
Timestamp:
02/02/19 06:24:11 (5 years ago)
Author:
obi
Message:

add dualboot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/oealliance/var/etc/autostart/start.sh

    r43406 r43407  
    257257startgui()
    258258{
     259        STARTDEFAULT="/usr/local/bin/titan /mnt/config/titan.cfg"
     260
     261        if [ -e "/var/etc/.checkdualboot" ] && [ -e "/usr/bin/enigma2" ];then
     262#               startbootlogo
     263                (sleep 10; killall infobox) &
     264                pid=$!
     265                if [ -e "/mnt/config/dualboot" ];then
     266                        infobox -pos -1 75% GUI#2 "Aktiviere Auswahlmenu (TitanNit/Enigma2)" "  Dualboot - nein" "  Dualboot - ja" ; ret=$?
     267                else
     268                        infobox -pos -1 75% GUI#1 "Aktiviere Auswahlmenu (TitanNit/Enigma2)" "  Dualboot - nein" "  Dualboot - ja" ; ret=$?
     269                fi
     270                kill -9 $pid
     271                echo " " > /dev/vfd
     272
     273                if [ "$ret" = "2" ];then
     274                        infobox -pos -1 75% 2 "Dualboot"  "  an" &
     275                        echo enable dualboot
     276                        touch /mnt/config/dualboot
     277                else
     278                        if [ "$ret" = "1" ];then
     279                                rm /mnt/config/dualboot
     280                                infobox -pos -1 75% 2 "Dualboot" "  aus" &
     281                        else
     282                                if [ -e "/mnt/config/dualboot" ];then
     283                                        infobox -pos -1 75% 2 "Dualboot"  "  an" &
     284                                else
     285                                        infobox -pos -1 75% 2 "Dualboot" "  aus" &
     286                                fi
     287                        fi
     288                fi
     289                echo "Starting" > /dev/vfd
     290                echo remove checkdualboot flag
     291                rm -f /var/etc/.checkdualboot
     292                sync
     293                sleep 10
     294#       else
     295#               rm -f /etc/rc2.d/*
     296#               rm -f /etc/rc3.d/*
     297#               rm -f /etc/rcS.d/*
     298        fi
     299
     300        # kill webif
    259301        fuser -k 80/tcp
    260         LD_PRELOAD=$LIBS /usr/local/bin/titan /mnt/config/titan.cfg
     302
     303        if [ -e /mnt/config/dualboot ] && [ -e "/usr/bin/enigma2" ];then
     304                if [ ! -e /mnt/config/dualboot.titan ] && [ ! -e /mnt/config/dualboot.enigma2 ] || [ -e /mnt/config/dualboot.titan ];then
     305
     306                        (sleep 10; killall infobox) &
     307                        pid=$!
     308                        infobox -pos -1 75% GUI#1 "++ DualBoot-Auswahl ++" "---- TitanNit  ----" "---- Enigma2 ----" ; ret=$?
     309                        kill -9 $pid
     310                        echo " " > /dev/vfd
     311
     312                        case $ret in
     313                                2)
     314                                        START="/usr/bin/enigma2"
     315                                        rm -f /mnt/config/dualboot.titan
     316                                        touch /mnt/config/dualboot.enigma2
     317                                        $STARTDEFAULT;;
     318                                *)
     319                                        START="/usr/local/bin/titan /mnt/config/titan.cfg"
     320                                        rm -f /mnt/config/dualboot.enigma2
     321                                        touch /mnt/config/dualboot.titan;;
     322                        esac
     323                else
     324
     325                        (sleep 10; killall infobox) &
     326                        pid=$!
     327                        infobox -pos -1 75% GUI#2 "++ DualBoot-Auswahl ++" "---- TitanNit  ----" "---- Enigma2 ----" ; ret=$?
     328                        kill -9 $pid
     329                        echo " " > /dev/vfd
     330
     331                        case $ret in
     332                                1)
     333                                        START="/usr/local/bin/titan /mnt/config/titan.cfg"
     334                                        rm -f /mnt/config/dualboot.enigma2
     335                                        touch /mnt/config/dualboot.titan;;
     336                                *)
     337                                        START="/usr/bin/enigma2"
     338                                        rm -f /mnt/config/dualboot.titan
     339                                        touch /mnt/config/dualboot.enigma2
     340                                        $STARTDEFAULT;;
     341                        esac
     342                fi
     343        fi
     344
     345#       if [ "$START" = "/usr/bin/enigma2" ];then
     346#               startInit3
     347#               #/usr/bin/showiframe /usr/share/bootlogo.mvi
     348#               startbootlogo
     349#       fi
     350
     351        if [ -z "$START" ]; then START="$STARTDEFAULT"; fi
     352
     353        LD_PRELOAD=$LIBS $START
    261354
    262355        # titan exit codes:
Note: See TracChangeset for help on using the changeset viewer.