Menu

postrun scripts are not run at all!

VKlsv
2013-04-12
2013-04-20
  • VKlsv

    VKlsv - 2013-04-12

    Hi,

    Double-checked everything, but still can't figure this one out.

    DRBL in Clonezilla Live mode, Ubuntu 12.04, drblpush.conf below:

    #Setup for general
    [general]
    domain=render
    nisdomain=render
    localswapfile=no
    client_init=text
    login_gdm_opt=
    timed_login_time=
    maxswapsize=
    ocs_img_repo_dir=/opt/os_images
    total_client_no=1
    create_account=
    account_passwd_length=8
    hostname=nd
    purge_client=no
    client_autologin_passwd=
    client_root_passwd=
    client_pxelinux_passwd=
    set_client_system_select=yes
    use_graphic_pxelinux_menu=no
    set_DBN_client_audio_plugdev=no
    open_thin_client_option=no
    client_system_boot_timeout=70
    language=en_US.UTF-8
    set_client_public_ip_opt=no
    config_file=drblpush.conf
    collect_mac=yes
    run_drbl_ocs_live_prep=yes
    drbl_ocs_live_server=
    clonezilla_mode=clonezilla_live_mode
    live_client_branch=alternative
    live_client_cpu_mode=generic
    drbl_mode=none
    drbl_server_as_NAT_server=no
    add_start_drbl_services_after_cfg=yes
    continue_with_one_port=y
    
    
    #Setup for eth0
    [eth0]
    interface=eth0
    mac=macadr-eth0.txt
    ip_start=11
    gateway=10.93.59.1
    

    Put a script in /opt/drbl/share/ocs/postrun/

    Script name is sethostname, mode is 755. run-parts doesn't complain:

    # run-parts --test /opt/drbl/share/ocs/postrun/
    /opt/drbl/share/ocs/postrun//sethostname
    

    However, when Clonezilla Live client finishes restore, script is never run. It does have a shebang on the first line (#!/bin/sh) and runs correctly if I launch it manually.

    I checked /usr/share/drbl/postrun/ocs/ directory on Clonezilla Live client, and it only has 00-readme.txt file. Why isn't the script copied there? How could this problem be troubleshooted?

    Tried running /opt/drbl/sbin/drbl-gen-ssi-files -t 10.93.59.34 to no avail.

     
  • VKlsv

    VKlsv - 2013-04-12

    Figured this one out.

    Since I'm using clonezilla_live_mode, I had to modify Clonezilla filesystem.squashfs to add the scripts:

    apt-get update && apt-get install squashfs-tools
    mkdir /tmp/clonezilla-squashfs
    cd /tmp/clonezilla-squashfs
    cp /tftpboot/node_root/clonezilla-live/live/filesystem.squashfs .
    unsquashfs filesystem.squashfs
    cd squashfs-root/usr/share/drbl/postrun/ocs
    cp /var/scripts/mysetupscript .
    run-parts --test `pwd`
    cd /tmp/clonezilla-squashfs/
    mksquashfs squashfs-root filesystem.squashfs.new
    cp filesystem.squashfs.new /tftpboot/node_root/clonezilla-live/live/filesystem.squashfs
    
     

Log in to post a comment.

MongoDB Logo MongoDB