Revision f2c04245

View differences:

src/image/Image.cc
87 87
    string public_attr;
88 88
    string persistent_attr;
89 89
    string dev_prefix;
90
    string source_attr;
90 91

  
91 92
    // ---------------------------------------------------------------------
92 93
    // Check default image attributes
......
154 155
    // ------------ PATH & SOURCE --------------------
155 156

  
156 157
    get_template_attribute("PATH", path_attr);
157
    get_template_attribute("SOURCE", source);
158
    get_template_attribute("SOURCE", source_attr);
158 159

  
159 160
    // The template should contain PATH or SOURCE
160
    if ( source.empty() && path_attr.empty() )
161
    if ( source_attr.empty() && path_attr.empty() )
161 162
    {
162 163
        string size_attr;
163 164
        string fstype_attr;
......
183 184
            goto error_size_format;
184 185
        }
185 186
    }
186
    else if ( !source.empty() && !path_attr.empty() )
187
    else if ( !source_attr.empty() && !path_attr.empty() )
187 188
    {
188 189
        goto error_path_and_source;
189 190
    }
191
    else if ( !source_attr.empty() )
192
    {
193
        source = source_attr;
194
    }
190 195

  
191 196
    state = LOCKED; //LOCKED till the ImageManager copies it to the Repository
192 197

  
src/image_mad/remotes/fs/mkfs
30 30
fi
31 31

  
32 32
. $LIB_LOCATION/sh/scripts_common.sh
33
source $(dirname $0)/fsrc
33 34

  
34 35
# ------------ Create the image to the repository ------------ 
35 36

  
src/image_mad/remotes/fs/rm
29 29
fi
30 30

  
31 31
. $LIB_LOCATION/sh/scripts_common.sh
32
source $(dirname $0)/fsrc
32 33

  
33 34
# ------------ Remove the image to the repository ------------ 
34 35

  

Also available in: Unified diff