diff options
author | Soren Hansen <soren@canonical.com> | 2009-08-26 01:19:41 +0200 |
---|---|---|
committer | Soren Hansen <soren@canonical.com> | 2009-08-26 01:19:41 +0200 |
commit | 2dfaecd33c44a355290696c1baf1cc7af05b50dc (patch) | |
tree | 8bbe6b9f2494d34ca95bcf92eace4ddc5805fa85 | |
parent | 08bb4a53db4b58e5c8911201f0982d5b5975444a (diff) | |
download | vyos-cloud-init-2dfaecd33c44a355290696c1baf1cc7af05b50dc.tar.gz vyos-cloud-init-2dfaecd33c44a355290696c1baf1cc7af05b50dc.zip |
Use /var/run/ec2 for mounting EBS volumes.
-rwxr-xr-x | ec2-init | 4 | ||||
-rwxr-xr-x | ec2-init-appliance-ebs-volume-mount.sh | 2 | ||||
-rw-r--r-- | tests.py | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -16,8 +16,8 @@ NAME=ec2-init . /lib/lsb/init-functions -if [ ! -d /var/ec2 ]; then - mkdir /var/ec2 +if [ ! -d /var/run/ec2 ]; then + mkdir /var/run/ec2 fi run_once() { diff --git a/ec2-init-appliance-ebs-volume-mount.sh b/ec2-init-appliance-ebs-volume-mount.sh index 7106b353..de3c63ca 100755 --- a/ec2-init-appliance-ebs-volume-mount.sh +++ b/ec2-init-appliance-ebs-volume-mount.sh @@ -29,7 +29,7 @@ then $do mkfs.ext3 "${ebs_volume_device}" fi -tmpdir="$(mktemp -d $mktemp_args --tmpdir=/var/run/ec2-init)" +tmpdir="$(mktemp -d $mktemp_args --tmpdir=/var/run/ec2)" $do mount ${ebs_volume_device} ${tmpdir} for dir in "$@" @@ -47,7 +47,7 @@ class RunUserDataApplianceConfigEBS(RunUserDataApplianceTestCase): output = self.real_mount_ebs_volume('/dev/sdh', ['/foo', '/bar']) lines = output.strip().split('\n') self.assertEqual(len(lines), 11) - match = re.match('mount /dev/sdh (/var/run/ec2-init/tmp.[a-zA-Z0-9]+)', lines[0]) + match = re.match('mount /dev/sdh (/var/run/ec2/tmp.[a-zA-Z0-9]+)', lines[0]) self.assertNotEqual(match, None) tmpdir = match.group(1) for (i, s) in zip(range(10), ['mkdir %s/_foo', 'cp -a /foo %s/_foo', 'chown --reference /foo %s/_foo', 'chmod --reference /foo %s/_foo', 'mount --bind %s/_foo /foo', 'mkdir %s/_bar', 'cp -a /bar %s/_bar', 'chown --reference /bar %s/_bar', 'chmod --reference /bar %s/_bar', 'mount --bind %s/_bar /bar']): |