]>
git.proxmox.com Git - mirror_lxc.git/blob - hooks/clonehostname
3 # Update the hostname in the cloned container's scripts
5 # Copyright © 2013 Oracle.
7 # This library is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License version 2, as
9 # published by the Free Software Foundation.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 # Note that /etc/hostname is updated by lxc itself
22 $LXC_ROOTFS_MOUNT/etc
/sysconfig
/network \
23 $LXC_ROOTFS_MOUNT/etc
/sysconfig
/network-scripts
/ifcfg-
* \
24 $LXC_ROOTFS_MOUNT/etc
/hosts
;
27 sed -i "s|$LXC_SRC_NAME|$LXC_NAME|" $file