Revision 1bb3e009

b/helper/rc.local
56 56
target=$(mktemp -d --tmpdir target.XXXXXXXX) || exit 1
57 57
CLEANUP+=("rmdir $target")
58 58

  
59
SNF_IMAGE_DEV=/dev/sdb
60
SNF_IMAGE_TARGET=$target
59
export SNF_IMAGE_DEV=/dev/sdb
60
export SNF_IMAGE_TARGET=$target
61 61

  
62
# Make sure all SNF_IMAGE_* variables are accessible by snf-image/tasks scripts
63
set | egrep ^SNF_IMAGE_\\w+= | cut -d= -f1 | while read line; do
64
    export $line
65
done
62
if [ ! -d "/usr/lib/snf-image/tasks" ]; then
63
    log_error "snf-image/tasks directory is missing"
64
fi
66 65

  
67
RUN_PARTS=`which run-parts`
68
if [ -n "$RUN_PARTS" -a -n "/usr/lib/snf-image/tasks" ]; then
69
    $RUN_PARTS "/usr/lib/snf-image/tasks"
66
RUN_PARTS=$(which run-parts)
67
if [ -z "$RUN_PARTS" ]; then
68
    log_error "run-parts programe is missing from the system"
70 69
fi
71 70

  
71
echo "Execute all snf-image tasks...." 
72
$RUN_PARTS -v --exit-on-error "/usr/lib/snf-image/tasks"
73

  
72 74
cleanup
73 75
trap - EXIT
74 76

  

Also available in: Unified diff