Set hostname in ramdisk image
This commit is contained in:
parent
7c076eeff5
commit
288f3bdc23
1 changed files with 5 additions and 1 deletions
|
@ -45,7 +45,7 @@ if [ ! -d $CHROOTCACHE/natty-dev ]; then
|
|||
chroot $CHROOTCACHE/natty-dev groupadd libvirtd
|
||||
chroot $CHROOTCACHE/natty-dev useradd stack -s /bin/bash -d $DEST -G libvirtd
|
||||
mkdir -p $CHROOTCACHE/natty-dev/$DEST
|
||||
chown stack $CHROOTCACHE/natty-dev/$DEST
|
||||
chroot $CHROOTCACHE/natty-dev chown stack $DEST
|
||||
|
||||
# a simple password - pass
|
||||
echo stack:pass | chroot $CHROOTCACHE/natty-dev chpasswd
|
||||
|
@ -115,6 +115,10 @@ auto eth0
|
|||
iface eth0 inet dhcp
|
||||
EOF
|
||||
|
||||
# Set hostname
|
||||
echo "ramstack" >$CHROOTCACHE/natty-stack/etc/hostname
|
||||
echo "127.0.0.1 localhost ramstack" >$CHROOTCACHE/natty-stack/etc/hosts
|
||||
|
||||
# Configure the runner
|
||||
RUN_SH=$CHROOTCACHE/natty-stack/$DEST/run.sh
|
||||
cat > $RUN_SH <<EOF
|
||||
|
|
Loading…
Reference in a new issue