• Hello, i would like to use fog.updateunattend but i have an error:
    syntax error unexpected token ‘[[’
    Still, i copy and paste the file in your tutorial and i just changed the first line to change the password.
    I checked the path of the unattended file andupdate unattend.png it is the right path…

    you can see my attached file to have more informationScreenshot_20200430_114203_com.huawei.himovie.overseas.jpg

    thank you for your help


  • really weird…i copied and pasted a few times…I tried again and you were right…i feel stupid…:(
    thank you so much!!!you are so helpful…:)

  • Moderator

    I just checked and the tutorial does have the do properly placed: https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed

    #!/bin/bash
    hostadpwd="ADPASSWDHERRE"; #only downside to this method- this is the plain ad password
    unattends=$(find /ntfs/ -iname "unattend.xml")
    for unattend in $unattends; do
        [[ ! -f $unattend ]] && return
        dots "Preparing Sysprep File"
    

  • bash for loops are:

    for unattend in $unattends; do
        [[ ! $unattend ]] && return
    .....
    done
    

    OR

    for unattend in $unattends
    do
        [[ ! $unattend ]] && return
    ......
    done
    

    You have:

    for unattend in $unattends
        [[ ! $unattend ]] && return
    ......
    done
    

    Notice you’re missing the “DO” after ther for statement.

311
Online

9.6k
Users

16.0k
Topics

148.0k
Posts