Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix syntax errors in some pre-removal and post-installation scripts #8046

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/CMake/config/postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ done
rmmodules

DRACUT_CONF_PATH=/etc/dracut.conf.d
if [ -e $DRACUT_CONF_PATH ] && [ $alveo == 1]; then
if [ -e $DRACUT_CONF_PATH ] && [ $alveo -eq 1 ]; then
install -m 644 /usr/src/xrt-@XRT_VERSION_STRING@/driver/xocl/userpf/xocl.dracut.conf $DRACUT_CONF_PATH
install -m 644 /usr/src/xrt-@XRT_VERSION_STRING@/driver/xocl/mgmtpf/xclmgmt.dracut.conf $DRACUT_CONF_PATH
fi

if [ $alveo == 0]; then
if [ $alveo -eq 0 ]; then
echo "Skipping XRT Alveo driver install"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion src/CMake/config/prerm-azure.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# configuration of the components and hence we want to handle the configuration
# in postinst script.

DIR=@@CMAKE_INSTALL_PREFIX@@/xrt
DIR=@CMAKE_INSTALL_PREFIX@/xrt

#In case prerm is called after postinst on centos, make sure not to stop mpd
awk -F= '$1=="ID" {print $2}' /etc/os-release | tr -d '"' | awk '{print tolower($1)}' | grep -Eq "^rhel|^centos"
Expand Down
2 changes: 1 addition & 1 deletion src/CMake/config/prerm-container.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [ $? -eq 0 ] && [ $1 -ge 1 ]; then
fi

echo "Remove mpd plugin"
rm -rf @@CMAKE_INSTALL_PREFIX@@/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
rm -rf @CMAKE_INSTALL_PREFIX@/xrt/lib/libmpd_plugin.so > /dev/null 2>&1
systemctl disable mpd > /dev/null 2>&1
systemctl stop mpd > /dev/null 2>&1

Expand Down
6 changes: 3 additions & 3 deletions src/CMake/config/prerm.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ rm -rf /etc/systemd/system/msd.service
rm -rf /etc/systemd/system/mpd.service
systemctl daemon-reload
# Remove config file for MSD as well
@@CMAKE_INSTALL_PREFIX@@/xrt/bin/xbmgmt --legacy config --purge 2>&1 > /dev/null
@CMAKE_INSTALL_PREFIX@/xrt/bin/xbmgmt --legacy config --purge 2>&1 > /dev/null

echo "Unloading old XRT Linux kernel modules"
rmmod xocl
Expand All @@ -79,7 +79,7 @@ rm -f /etc/dracut.conf.d/xocl.dracut.conf
rm -f /etc/dracut.conf.d/xclmgmt.dracut.conf

echo "Cleaning up python..."
rm -f @@CMAKE_INSTALL_PREFIX@@/xrt/python/*.pyc
rm -f @@CMAKE_INSTALL_PREFIX@@/xrt/test/*.pyc
rm -f @CMAKE_INSTALL_PREFIX@/xrt/python/*.pyc
rm -f @CMAKE_INSTALL_PREFIX@/xrt/test/*.pyc

exit 0
Loading