~ubuntu-branches/ubuntu/quantal/lxc/quantal-201208301614

« back to all changes in this revision

Viewing changes to templates/lxc-debian.in

  • Committer: Package Import Robot
  • Author(s): Daniel Baumann
  • Date: 2012-03-09 13:05:03 UTC
  • mto: (3.1.38 sid)
  • mto: This revision was merged to the branch mainline in revision 94.
  • Revision ID: package-import@ubuntu.com-20120309130503-j0prgw9tsp967bbv
Tags: upstream-0.8.0~rc1
ImportĀ upstreamĀ versionĀ 0.8.0~rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
 
143
143
    # make a local copy of the minidebian
144
144
    echo -n "Copying rootfs to $rootfs..."
145
 
    cp -a "$cache/rootfs-$SUITE-$arch" $rootfs || return 1
 
145
    mkdir -p $rootfs
 
146
    rsync -a "$cache/rootfs-$SUITE-$arch"/ $rootfs/ || return 1
146
147
    return 0
147
148
}
148
149
 
186
187
{
187
188
    path=$1
188
189
    rootfs=$2
189
 
    name=$3
 
190
    hostname=$3
190
191
 
191
192
    cat <<EOF >> $path/config
192
193
lxc.tty = 4
193
194
lxc.pts = 1024
194
195
lxc.rootfs = $rootfs
 
196
lxc.utsname = $hostname
195
197
lxc.cgroup.devices.deny = a
196
198
# /dev/null and zero
197
199
lxc.cgroup.devices.allow = c 1:3 rwm
307
309
    exit 1
308
310
fi
309
311
 
310
 
copy_configuration $path $rootfs
 
312
copy_configuration $path $rootfs $name
311
313
if [ $? -ne 0 ]; then
312
314
    echo "failed write configuration file"
313
315
    exit 1