source: lmd/trunk/fuentes/lmd-server.install/usr/sbin/lmd-clone-img.sh @ 2582

Last change on this file since 2582 was 2582, checked in by joamuran, 4 years ago

Added import/export/clone and edit options for image capabilities

  • Property svn:executable set to *
File size: 621 bytes
Line 
1#!/bin/bash
2
3
4if [ $# -ne 3 ]; 
5    then echo "lmd-clone-img.sh needs 3 parameters. "
6    echo "<b>Finished with status -1</b>"
7    exit -1;
8fi
9
10tmp_descriptor=${1}
11original_path=${2}
12new_imagename=${3}
13
14rsync -avx $original_path/* /opt/ltsp/${new_imagename}
15cp ${tmp_descriptor} /etc/ltsp/images/
16
17ltsp-update-kernels ${new_imagename}
18ltsp-update-sshkeys
19ltsp-update-image ${new_imagename}
20 
21# Restarting NBD
22invoke-rc.d nbd-server restart
23
24echo "<br/>Image has been cloned.<br/>"
25echo "<br/><b>You can set clients to boot it with Boot Manager in Admin Center.</b><br/><br/>"
26echo "<b>Finished with status 0</b>"
27exit 0
Note: See TracBrowser for help on using the repository browser.