εντολη για exit σε looped script
#1
δεν εχει κατηγορια για προγραμματισμο, και με φανηκε εδω η πιο καταλληλη. τεσπα. εχω φτιαξει ενα σκριπτ (μαλλον προγραμμα ολοκληρο το λες, ετσι που κατεληξε :D:p ), το οποιο το εχω για να διαχειριζομαι τον εξομοιωτη με εντολες (εχω σετταρει προκαθορισμενες εντολες, και αναλογα το input εκτελει το καταλληλο σετ εντολων). αν δεν δωσω καποια εντολη, απλα καθεται και περιμενει χωρις να κανει τιποτα. αν δεν κανει τιποτα και θελω να το κλεισω, το κλεινω με control-c. πως θα μπορουσα μεσα στο loop να ενσωματωσω μια εντολη "exit", ωστε οταν το δινω την εν λογω εντλη να κλεινει? ιδου και το τερατουργημα (προσεξτε οτι ολοκληρο ειναι μεσα σε while loop, γιατι θελω να «ανακυκλωνεται» οσο το χρησιμοποιω):...

Κώδικας:
#!/bin/bash
while [ 1 ]
do
    echo "System To Start / Configure [pantzouria8|debian64|converger]" && read "vmname"
    echo "Parse Command [start|revert|snapget|snapdel|setbios|delbios]" && read "command"
    if [ "$command" == "setbios" ]
    then
        echo "fake bios setup:."$vmname""    && read
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor"            "American Megatrends Inc"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion"            "string:1501"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate"        "10/09/2012"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor"        "15"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor"        "01"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor"        "8"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor"        "15"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor"            "Asus"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct"            "R.O.G. AMD240X2"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion"            "AM2II"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily"            "X64-based-PC"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"            "40F43128-D273-DE11-AFDF-0026187A48E9"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor"            "ASUSTeK Computer INC"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct"            "Asus M4N78 SE"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion"            "Rev X.0x"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial"            "string:100888160000609"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass"        "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardBoardType"        "10"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisType"            "3"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion"        "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag"        "Asset-1234567890"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer"        "AMD"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion"            "AMD Athlon(tm) II X2 240 Processor"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer"            "OEM-Ver_4.2.36"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev"            "OEM-Rev_104064"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber"    "ST2458972"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision"    "REV10ST"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber"    "Seagate ST2458972"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/SerialNumber"    "VRT873487"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/FirmwareRevision"    "REV01"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/ModelNumber"    "LoopVirtualDrive"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIProductId"    "OEM278347"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIRevision"    "REV2"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIVendorId"    "OEM"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIProductId"    "OEM278347"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIRevision"    "REV2"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIVendorId"    "OEM"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG8B"                        "1"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG16B"                        "1"
        VBoxManage modifyvm    "$vmname"    "--largepages"                                "on"
        read
    else
        if [ "$command" == "delbios" ]
        then
            echo "fake bios reset:."$vmname""    && read
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardBoardType"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisType"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/SerialNumber"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/FirmwareRevision"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/ModelNumber"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIProductId"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIRevision"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIVendorId"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIProductId"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIRevision"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIVendorId"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG8B"                        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG16B"                        ""
            VBoxManage modifyvm    "$vmname"    "--largepages"                                "on"
            read
        else
            echo""
        fi
    fi
    if [ "$command" == "start" ]
    then
        if [ "$vmname" == "pantzouria8" ]
        then
            VirtualBox --startvm "$vmname" && read
        else
            if [ "$vmname" == "debian64" ]
            then
                VBoxSDL --startvm "$vmname" && read
            else
                if [ "$vmname" == "converger" ]
                then
                    VBoxSDL --startvm "$vmname" && read
                else
                    echo""
                fi
            fi
        fi
    fi
    if [ "$command" == "revert" ]
    then
        VBoxManage snapshot "$vmname" restorecurrent && read
    else
        echo""
    fi
    if [ "$command" == "snapget" ]
    then
        VBoxManage snapshot "$vmname" take "$vmname" && read
    else
        echo""
    fi
    if [ "$command" == "snapdel" ]
    then
        VBoxManage snapshot "$vmname" delete "$vmname" && read
    else
        echo""
    fi
done
exit 0
ονομαζομαι DarkGoth, και ειμαι «καλα»( ; )... το OsArena με θεραπευσε... (goth=!ok {equals} EMO)...  Emo
  Απάντηση
#2
αφηστε το, το βρηκα τελικα ;):winkx :...

στην αρχη εβαλα αυτο:...

Κώδικας:
echo "Set Configurator Program Status [exit|restart]" && read "status"

στο τελος του εβαλα αυτο:...

Κώδικας:
if [ "$status" == "exit" ]
    then
        exit
    else
        echo""
    fi

τελικα ηταν ΤΟΣΟ ΑΠΛΟ!... Eek
ονομαζομαι DarkGoth, και ειμαι «καλα»( ; )... το OsArena με θεραπευσε... (goth=!ok {equals} EMO)...  Emo
  Απάντηση
#3
και ιδου το ανανεωμενο τερατουργημα :D:p :...
Κώδικας:
#!/bin/bash
while [ 1 ]
do
    echo "System To Start / Configure [pantzouria8|debian64|converger]" && read "vmname"
    echo "Parse Command [start|revert|snapget|snapdel|setbios|delbios]" && read "command"
    echo "Set Configurator Program Status [exit]" && read "status"
    if [ "$command" == "setbios" ]
    then
        echo "fake bios setup:."$vmname""    && read
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor"            "American Megatrends Inc"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion"            "string:1501"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate"        "10/09/2012"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor"        "15"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor"        "01"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor"        "8"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor"        "15"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor"            "Asus"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct"            "R.O.G. AMD240X2"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion"            "AM2II"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily"            "X64-based-PC"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"            "40F43128-D273-DE11-AFDF-0026187A48E9"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor"            "ASUSTeK Computer INC"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct"            "Asus M4N78 SE"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion"            "Rev X.0x"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial"            "string:100888160000609"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass"        "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardBoardType"        "10"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisType"            "3"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion"        "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial"            "To Be Filled By O.E.M."
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag"        "Asset-1234567890"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer"        "AMD"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion"            "AMD Athlon(tm) II X2 240 Processor"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer"            "OEM-Ver_4.2.36"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev"            "OEM-Rev_104064"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber"    "ST2458972"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision"    "REV10ST"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber"    "Seagate ST2458972"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/SerialNumber"    "VRT873487"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/FirmwareRevision"    "REV01"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/ModelNumber"    "LoopVirtualDrive"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIProductId"    "OEM278347"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIRevision"    "REV2"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIVendorId"    "OEM"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIProductId"    "OEM278347"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIRevision"    "REV2"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIVendorId"    "OEM"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG8B"                        "1"
        VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG16B"                        "1"
        VBoxManage modifyvm    "$vmname"    "--largepages"                                "on"
        read
    else
        if [ "$command" == "delbios" ]
        then
            echo "fake bios reset:."$vmname""    && read
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardBoardType"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisType"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer"        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev"            ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/SerialNumber"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/FirmwareRevision"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/ModelNumber"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIProductId"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIRevision"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIVendorId"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIProductId"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIRevision"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIVendorId"    ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG8B"                        ""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG16B"                        ""
            VBoxManage modifyvm    "$vmname"    "--largepages"                                "on"
            read
        else
            echo""
        fi
    fi
    if [ "$command" == "start" ]
    then
        if [ "$vmname" == "pantzouria8" ]
        then
            VirtualBox --startvm "$vmname" && read
        else
            if [ "$vmname" == "debian64" ]
            then
                VBoxSDL --startvm "$vmname" && read
            else
                if [ "$vmname" == "converger" ]
                then
                    VBoxSDL --startvm "$vmname" && read
                else
                    echo""
                fi
            fi
        fi
    fi
    if [ "$command" == "revert" ]
    then
        VBoxManage snapshot "$vmname" restorecurrent && read
    else
        if [ "$command" == "snapget" ]
        then
            VBoxManage snapshot "$vmname" take "$vmname" && read
        else
            if [ "$command" == "snapdel" ]
            then
                VBoxManage snapshot "$vmname" delete "$vmname" && read
            else
                echo""
            fi
        fi
    fi
    if [ "$status" == "exit" ]
    then
        exit
    else
        echo""
    fi
done
exit 0
ονομαζομαι DarkGoth, και ειμαι «καλα»( ; )... το OsArena με θεραπευσε... (goth=!ok {equals} EMO)...  Emo
  Απάντηση
#4
και τελικα το τερατουργημα το εξελιξα σε κανονικοτατο προγραμματακι :D:lolx :...

Κώδικας:
#!/bin/bash
while [ 1 ]
do
    reset
    echo 'VirtualBox Systems, Commandline Setup Program'
    echo 'Release Version:... 1.01, Codename, "os-ception"' && echo
    VBoxManage list vms
    echo '"    start/-sdl/-fs    "    '
    echo '"    revert/-sel    "    '
    echo '"    snapget/-list    "    '
    echo '"    snapdel/-sel    "    '
    echo '"    setbios/-del    "    '
    read "vmname" "command"
        if [ "$command" == "setbios" ]
        then
            echo "fake bios setup:."$vmname""
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor"            "American Megatrends Inc"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion"            "string:1501"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate"        "10/09/2012"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor"        "15"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor"        "01"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor"        "8"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor"        "15"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor"            "Asus"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct"            "R.O.G. AMD240X2"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion"            "AM2II"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial"            "To Be Filled By O.E.M."
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU"            "To Be Filled By O.E.M."
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily"            "X64-based-PC"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"            "40F43128-D273-DE11-AFDF-0026187A48E9"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor"            "ASUSTeK Computer INC"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct"            "Asus M4N78 SE"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion"            "Rev X.0x"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial"            "string:100888160000609"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag"            "To Be Filled By O.E.M."
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass"        "To Be Filled By O.E.M."
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardBoardType"        "10"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor"            "To Be Filled By O.E.M."
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisType"            "3"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion"        "To Be Filled By O.E.M."
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial"            "To Be Filled By O.E.M."
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag"        "Asset-1234567890"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer"        "AMD"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion"            "AMD Athlon(tm) II X2 240 Processor"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer"            "OEM-Ver_4.2.36"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev"            "OEM-Rev_104064"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber"    "ST2458972"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision"    "REV10ST"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber"    "Seagate ST2458972"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/SerialNumber"    "VRT873487"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/FirmwareRevision"    "REV01"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/ModelNumber"    "LoopVirtualDrive"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIProductId"    "OEM278347"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIRevision"    "REV2"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIVendorId"    "OEM"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIProductId"    "OEM278347"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIRevision"    "REV2"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIVendorId"    "OEM"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG8B"                        "1"
            VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG16B"                        "1"
            VBoxManage modifyvm    "$vmname"    "--largepages"                                "on"
            VBoxManage modifyvm    "$vmname"    "--vram"                                "256"
            read && reset
        else
            if [ "$command" == "setbios/-del" ]
            then
                echo "fake bios reset:."$vmname""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseDate"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMajor"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSReleaseMinor"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMajor"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBIOSFirmwareMinor"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVersion"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSKU"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemFamily"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVersion"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardAssetTag"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardLocInChass"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiBoardBoardType"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVendor"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisType"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisVersion"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiChassisAssetTag"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcManufacturer"        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiProcVersion"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxVer"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/pcbios/0/Config/DmiOEMVBoxRev"            ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/SerialNumber"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/FirmwareRevision"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimaryMaster/ModelNumber"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/SerialNumber"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/FirmwareRevision"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/PrimarySlave/ModelNumber"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIProductId"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIRevision"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondaryMaster/ATAPIVendorId"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIProductId"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIRevision"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/Devices/piix3ide/0/Config/SecondarySlave/ATAPIVendorId"    ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG8B"                        ""
                VBoxManage setextradata    "$vmname"    "VBoxInternal/CPUM/CMPXCHG16B"                        ""
                VBoxManage modifyvm    "$vmname"    "--largepages"                                "on"
                VBoxManage modifyvm    "$vmname"    "--vram"                                "256"
                read && reset
            fi
        fi
        if [ "$command" == "start" ]
        then
            VirtualBox --startvm "$vmname"
            read && reset
        else
            if [ "$command" == "start/-sdl" ]
            then
                VBoxSDL --startvm "$vmname"
                read && reset
            else
                if [ "$command" == "revert" ]
                then
                    VBoxManage snapshot "$vmname" restorecurrent
                    read && reset
                else
                    if [ "$command" == "revert/-sel" ]
                    then
                        VBoxManage snapshot "$vmname" list
                        read "snapname"
                        VBoxManage snapshot "$vmname" restore "$snapname"
                        read && reset
                    else
                        if [ "$command" == "snapget" ]
                        then
                            VBoxManage snapshot "$vmname" take "$vmname"
                            read && reset
                        else
                            if [ "$command" == "snapget/-list" ]
                            then
                                VBoxManage snapshot "$vmname" list
                                read && reset
                            else
                                if [ "$command" == "snapdel" ]
                                then
                                    VBoxManage snapshot "$vmname" delete "$vmname"
                                    read && reset
                                else
                                    if [ "$command" == "snapdel/-sel" ]
                                    then
                                        VBoxManage snapshot "$vmname" list
                                        read "snapname"
                                        VBoxManage snapshot "$vmname" delete "$snapname"
                                        read && reset
                                    else
                                        if [ "$command" == "start/-sdl/-fs" ]
                                        then
                                            VBoxSDL --startvm "$vmname" --fullscreen
                                            read && reset
                                        fi
                                    fi
                                fi
                            fi
                        fi
                    fi
                fi
            fi
        fi
        if [ "$vmname" == "" ]
        then
            if [ "$command" == "" ]
            then        
                exit
            fi
        fi
done

status update (και εδω το τερατουργημα σε λειτουργια :p:lolx ):...
[IMG]screenshot-untitled_window-1.png[/IMG]
ονομαζομαι DarkGoth, και ειμαι «καλα»( ; )... το OsArena με θεραπευσε... (goth=!ok {equals} EMO)...  Emo
  Απάντηση


Ίσως Σχετικά Νήματα...
Νήμα Άτομο Απαντήσεις Βλεφαριάσματα Τελευταία Ανάρτηση
  Εφέ μεγέθυνσης οθόνης στο kde και η εντολή της. Πράος 10 1.471 01.08.2018 23:41
Τελευταία Ανάρτηση: Πράος
  Script για άμεσο download όλων των εικόνων από το Imgur constantinos 0 531 16.04.2013 16:34
Τελευταία Ανάρτηση: constantinos
  Συνδυασμός προγραμμάτων για Script παρακολούθησης της θερμοκρασία Panos M 4 1.017 13.05.2012 21:55
Τελευταία Ανάρτηση: Panos M

Πάμε στο Forum:


Πλάσματα σουλατσάρουν στο νήμα: 1 Επισκέπτης(ες)