source: trunk/contrib/getimage @ 559

Last change on this file since 559 was 559, checked in by bas, 7 years ago

added example of exclude files
fixed an error in getimage, closes #66

  • Property svn:executable set to *
  • Property svn:keywords set to Id URL
File size: 731 bytes
Line 
1#!/bin/bash
2#
3# Author: Danny Steenman
4#
5# SVN info:
6#       $https://subtrac.sara.nl/users/dannys/svn/trunk/
7#
8SALI_DIR=/data/sali
9SALI_IMAGE_DIR=$SALI_DIR/images
10
11if [ $# -lt 2 ]
12then 
13        echo "usage: `basename $0` <node_name> <image_name>"
14        exit 1
15fi
16
17if [ -f /etc/sali/exclude/$2.path ];
18then   
19        imagename="$2.path"     
20else 
21        imagename="default.path"
22    if [ ! -f /etc/sali/exclude/${imagename} ]
23    then
24        echo "Exclude file:/etc/sali/exclude/${imagename} does not exists"
25        exit 1
26    fi
27fi
28
29#sali command is used with the userinput
30echo "sali getimage --host $1 --image $2 --exclude /etc/sali/exclude/${imagename}"
31sali getimage --host $1 --image $2 --exclude /etc/sali/exclude/${imagename}
32
33echo "sali rsync"
34sali rsync
Note: See TracBrowser for help on using the repository browser.