mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 03:32:04 +00:00
Fix clean install problem of xcat-genesis-base
This commit is contained in:
parent
b32764540c
commit
e354ffc897
@ -17,6 +17,8 @@ set -x
|
||||
[ -n "${RPM_PACKAGE}" ] || exit 1
|
||||
[ -f "${RPM_PACKAGE}" ] || exit 1
|
||||
|
||||
umask 0022
|
||||
|
||||
EXTRACT_DIR="${RPM_PACKAGE##*/}"
|
||||
EXTRACT_DIR="${EXTRACT_DIR%%-snap*}"
|
||||
|
||||
@ -39,7 +41,7 @@ fi
|
||||
|
||||
sed -i -e "/^Description:/i Breaks: xcat-genesis-scripts-${PACKAGE_ARCH//x86_64/amd64} (<< 2.13.10)" "${EXTRACT_DIR}/debian/control"
|
||||
|
||||
cat >"${EXTRACT_DIR}/debian/preinst" <<-EOF
|
||||
cat >"${EXTRACT_DIR}/debian/preinst" <<EOF
|
||||
#!/bin/bash
|
||||
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/bin ] &&
|
||||
@ -52,6 +54,10 @@ cat >"${EXTRACT_DIR}/debian/preinst" <<-EOF
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib64
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/var/run ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/var/run
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
chmod 0755 "${EXTRACT_DIR}/debian/preinst"
|
||||
|
||||
( cd "${EXTRACT_DIR}" && debian/rules binary )
|
||||
|
Loading…
x
Reference in New Issue
Block a user