Do not remove the kernel src for packer build

These required to build vboxguest kernel module

Closes-bug: #1528151

Change-Id: I4229ffe137d770dd18c5225af6872d0243d2116d
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-12-21 11:44:40 +01:00
parent 8f63ec03f2
commit f875ac705d
1 changed files with 6 additions and 1 deletions

View File

@ -22,7 +22,12 @@ apt-get -y clean
echo "==> Removing man pages"
rm -rf /usr/share/man/*
echo "==> Removing anything in /usr/src"
echo "==> Removing anything in /usr/src but this kernel src"
p2=$(uname -r | cut -d- -f1-2)
mv "/usr/src/linux-headers-${p2}" /tmp
mv /usr/src/linux-headers-$(uname -r) /tmp
rm -rf /usr/src/*
mv "/tmp/linux-headers-${p2}" /usr/src/
mv /tmp/linux-headers-$(uname -r) /usr/src/
echo "==> Removing any docs"
rm -rf /usr/share/doc/*