Skip to content

Commit 868dcd0

Browse files
authored
Merge pull request #162 from thin-edge/fix-openrc-service-upgrade
fix: delete openrc service symlinks before installing package contents
2 parents 3aa6d21 + aa525d2 commit 868dcd0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.goreleaser.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ nfpms:
105105
- tedge-container-plugin
106106

107107
scripts:
108+
preinstall: ./packaging/scripts/pre-install
108109
preremove: ./packaging/scripts/pre-remove
109110
postinstall: ./packaging/scripts/post-install
110111
postremove: ./packaging/scripts/post-remove

packaging/scripts/pre-install

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
set -e
3+
4+
echo "Running pre-install: $*"
5+
6+
# remove old symlink which will be replaced by a normal file during installation
7+
if [ -L /etc/init.d/tedge-container-plugin ]; then
8+
rm -f /etc/init.d/tedge-container-plugin
9+
fi
10+
if [ -L /etc/conf.d/tedge-container-plugin ]; then
11+
rm -f /etc/conf.d/tedge-container-plugin
12+
fi

0 commit comments

Comments
 (0)