kernel-firmware/qcom-post

28 lines
867 B
Plaintext
Raw Normal View History

%pre qcom
# ugly workaround for changing qcom/LENOVO/21BX to a symlink (bsc#1204103)
if [ ! -L %{_firmwaredir}/qcom/LENOVO/21BX ]; then
if [ -d %{_firmwaredir}/qcom/LENOVO/21BX ]; then
mv %{_firmwaredir}/qcom/LENOVO/21BX %{_firmwaredir}/qcom/LENOVO/21BX.xxxold
fi
fi
%post qcom
# ugly workaround (bsc#1204103)
if [ -d %{_firmwaredir}/qcom/LENOVO/21BX.xxxold ]; then
mv %{_firmwaredir}/qcom/LENOVO/21BX %{_firmwaredir}/qcom/LENOVO/21BX.xxxnew
mv %{_firmwaredir}/qcom/LENOVO/21BX.xxxold %{_firmwaredir}/qcom/LENOVO/21BX
else
%{?regenerate_initrd_post}
fi
%postun qcom
%{?regenerate_initrd_post}
%posttrans qcom
# ugly workaround (bsc#1204103)
if [ -L %{_firmwaredir}/qcom/LENOVO/21BX.xxxnew ]; then
rm -rf %{_firmwaredir}/qcom/LENOVO/21BX
mv %{_firmwaredir}/qcom/LENOVO/21BX.xxxnew %{_firmwaredir}/qcom/LENOVO/21BX
fi
%{?regenerate_initrd_posttrans}