[Mellanox]WA to avoid fsroot being corrupted by "dpkg --extract"
This commit is contained in:
parent
ec85c2e159
commit
e95504fe72
@ -344,7 +344,14 @@ sudo chmod a+x $FILESYSTEM_ROOT/usr/sbin/policy-rc.d
|
||||
{% if installer_debs.strip() -%}
|
||||
{% for deb in installer_debs.strip().split(' ') -%}
|
||||
{% if sonic_asic_platform == "mellanox" %}
|
||||
sudo dpkg --extract {{deb}} $FILESYSTEM_ROOT
|
||||
if [ -e tmpdir ] ;
|
||||
then
|
||||
rm -rf tmpdir;
|
||||
fi
|
||||
sudo mkdir tmpdir
|
||||
sudo dpkg --extract {{deb}} tmpdir
|
||||
for subdir in $(ls tmpdir) ; do sudo cp -R tmpdir/$subdir/* $FILESYSTEM_ROOT/$subdir; done
|
||||
sudo rm -rf tmpdir
|
||||
{% else %}
|
||||
sudo dpkg --root=$FILESYSTEM_ROOT -i {{deb}} || sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user