Menu

Pass params to bash script in ocs_live_run

flyfoxuk
2012-09-26
2013-04-05
  • flyfoxuk

    flyfoxuk - 2012-09-26

    My syslinux.cfg file has an entry that uses ocs_live_run to call my bash script, which ultimately calls ocs-sr to do the cloning.  I would like to pass a couple of parameters to my bash script, specifically -s (meaning "simulation" - my script will not actually call ocs-sr if this switch is specified, just output some text instead) and -a <value> (meaning "action" - either savedisk or restoredisk, to pass as part of the call to ocs-sr).

    The call to ocs_live_run is defined like this:

    ocs_live_run="sudo /live/image/live/my_disk_script.sh -s -a restoredisk"
    

    But it doesn't seem to get that far and the loading process seems to stop at this position:

    root@debian:~#  sudo locales tzdata upstart-tty keyboard-configuration initramfs-tools util-linux login openssh-server umountfs.
    

    If I remove the "-s -a restoredisk" parameters from the ocs_live_run entry, the script runs fine but obviously without any parameters to use.

    What is the correct way to call my script with some parameters, within the SYSLINUX config entries for CloneZilla?

    Many thanks,

    FlyFox.

     
  • Steven Shiau

    Steven Shiau - 2012-09-29

    Which version of Clonezilla live did you use?

    Steven.

     
  • flyfoxuk

    flyfoxuk - 2012-09-29

    Hi Steven,

    I am using clonezilla-live-20120620-precise for my bootable USB stick.

    Many thanks,

    FlyFox.

     
  • flyfoxuk

    flyfoxuk - 2012-09-29

    Thanks Steven,

    Thanks you your prompt about the version, I rechecked and did a new USB stick with version clonezilla-live-1.2.12-67-i486 and this seems to work fine with parameters passed to the bash script.

    Sorry to bother you - not sure where my previous version of CloneZilla came from.

    (Version numbers taken from Clonezilla-Live-Version file on USB stick)

    FlyFox.

     
  • Steven Shiau

    Steven Shiau - 2012-09-29

    Cool! No problem. Enjoy!

    Steven.

     

Log in to post a comment.

Auth0 Logo