Menu

Custom script reports errors

Help
2010-04-12
2013-04-05
  • Lasse Dollerup

    Lasse Dollerup - 2010-04-12

    Hi

    I'm currently making a automated pxe boot to restore images.

    To automatically mount samba share, I wanted to use custome scripts.

    I then found this example:
    http://clonezilla.org/clonezilla-live/doc/fine-print.php?path=./07_Customized_script_with_PXE/00_customized_script_with_PXE.doc#00_customized_script_with_PXE.doc

    The example works up to the point when the system runs the custom-ocs 2 file.

    The screen i cleard and i get errors on every line:

    first couple of errors are:
    no such file or directory /opt/drbl/sbin/drbl-conf-functions
    no such file or directory /opt/drbl/sbin/ocs-functions
    no such file or directory /opt/drbl/sbin/ocs-live.conf

    Theese errors corrosponds to the following part of the script:
    #!/bin/bash
    . /opt/drbl/sbin/drbl-conf-functions
    . /opt/drbl/sbin/ocs-functions
    . /etc/ocs/ocs-live.conf

    If I type:
    . /opt/drbl/sbin/drbl-conf-functions
    in the shell afterwards, the system finds the file without any problems.

    Can anyone help.

    In advance thanks

     
  • Steven Shiau

    Steven Shiau - 2010-04-14

    Weird… Looks normal…
    Where did you edit your script? If it's on MS windows, remember to use dos2unix command to convert that.

    Steven.

     
  • Lasse Dollerup

    Lasse Dollerup - 2010-04-15

    AHA!

    Dammit, that was simple. Thanks a bunch.

    Love the clonezilla live. Going to implement it for fast manual backup om my Linux NAS at home :D

    Thanks for the help.

     
  • Lasse Dollerup

    Lasse Dollerup - 2010-04-15

    As you might have guessed, I'm fairly noob at unix.

    I godt this piece of code somewhere on the forum but I have a problem, maybe you can help:

    if mountpoint /home/partimag/ &>/dev/null; then
      ocs-sr -l en_US.UTF-8 -c -p choose restoredisk ask_user ask_user
    else
      [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
      echo "Fail to find the Clonezilla image home /home/partimag!"
      echo "Program terminated!"
      [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
    fi
    

    The (if mountpoint /home/partimag/ &>/dev/null; then) part always return false, even though the samba share is mounted and all.

    Hope you can spot the error :D

     
  • Steven Shiau

    Steven Shiau - 2010-04-17

    It depends on the mountpoint version, there was a buggy version which gives false alarm:
    Ref: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/486667
    Here it's a workaround to avoid false alarm for cifs (you can find that in /opt/drbl/sbin/ocs-functions):
        if ; then
          # For cifs, we check in another method
          if ; then
            success_mountpoint
          else
            fail_mountpoint
          fi
        else
          fail_mountpoint
        fi

    Steven.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.