vmcheck: fixes for CentOS 7

The `install` command in CentOS 7 is too old to understand that
`-Dt foo/bar` means creating both `foo` and `bar`, which is useful so
that we avoid an explicit `mkdir` before. But we can't do that here.

Closes: #871
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2017-07-10 22:12:47 -07:00 committed by Atomic Bot
parent 2934799741
commit 114d53a02d
2 changed files with 6 additions and 3 deletions

View File

@ -36,9 +36,11 @@ vm_build_rpm nonrootcap \
done" \
pre "groupadd -r nrcgroup
useradd -r nrcuser -g nrcgroup -s /sbin/nologin" \
install "install -Dt %{buildroot}/etc nrc.conf
install "mkdir -p %{buildroot}/etc
install nrc.conf %{buildroot}/etc
ln -sr %{buildroot}/etc/nrc.conf %{buildroot}/etc/nrc-link.conf
install -Dt %{buildroot}/usr/bin *.sh
mkdir -p %{buildroot}/usr/bin
install *.sh %{buildroot}/usr/bin
ln -sr %{buildroot}/usr/bin/{nrc-user.sh,nrc-user-link.sh}
mkdir -p %{buildroot}/var/lib/nonrootcap
mkdir -p %{buildroot}/run/nonrootcap

View File

@ -52,7 +52,8 @@ echo "ok livefs stage1"
vm_build_rpm test-livefs-with-etc \
build 'echo "A config file for %{name}" > %{name}.conf' \
install 'install -Dt %{buildroot}/etc %{name}.conf
install 'mkdir -p %{buildroot}/etc
install %{name}.conf %{buildroot}/etc
mkdir -p %{buildroot}/etc/%{name}/
echo subconfig-one > %{buildroot}/etc/%{name}/subconfig-one.conf
echo subconfig-two > %{buildroot}/etc/%{name}/subconfig-two.conf