postinst增加判断arch

This commit is contained in:
shenmo 2023-03-04 21:09:05 +08:00
parent 7ec6be1969
commit 8f39710cdb
2 changed files with 11 additions and 8 deletions

@ -2,13 +2,20 @@
case "$1" in
configure)
# Enable i386 arch
case `arch` in
x86_64)
echo "Enabling i386 arch..."
dpkg --add-architecture i386
;;
*)
echo "Not amd64, skip enable i386 arch"
;;
esac
# config for aptss
mkdir -p /etc/aptss/sources.list.d
ln -s -f /etc/apt/sources.list /etc/aptss/sources.list
# Remove the sources.list file
rm -f /etc/apt/sources.list.d/sparkstore.list
@ -17,8 +24,6 @@ case "$1" in
mkdir -p /usr/local/bin
# Create symbol links for binary files
ln -s -f /opt/durapps/spark-store/bin/ussinstall /usr/local/bin/ussinstall
ln -s -f /opt/durapps/spark-store/bin/ussremove /usr/local/bin/ussremove
ln -s -f /opt/durapps/spark-store/bin/spark-store /usr/local/bin/spark-store
ln -s -f /opt/durapps/spark-store/bin/ssinstall /usr/local/bin/ssinstall
ln -s -f /opt/durapps/spark-store/bin/ssaudit /usr/local/bin/ssaudit

@ -16,8 +16,6 @@ if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then
rm -f /usr/local/bin/ssinstall
rm -f /usr/local/bin/ssaudit
rm -f /usr/local/bin/spark-dstore-patch
rm -f /usr/local/bin/ussinstall
rm -f /usr/local/bin/ussremove
rm -f /usr/local/bin/ss-apt-fast
rm -f /usr/bin/aptss