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

Last change on this file since 3136 was 3136, checked in by kbut, 3 years ago

add script to set search domain

  • Property svn:executable set to *
File size: 652 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}
20ltsp-set-domain-search-ltsconf
21 
22# Restarting NBD
23invoke-rc.d nbd-server restart
24
25echo "<br/>Image has been cloned.<br/>"
26echo "<br/><b>You can set clients to boot it with Boot Manager in Admin Center.</b><br/><br/>"
27echo "<b>Finished with status 0</b>"
28exit 0
Note: See TracBrowser for help on using the repository browser.