Skip to content

Commit 15ff583

Browse files
authored
avoid 'install /dev/stdin' in rpm build (#424)
1 parent 7f1ab9a commit 15ff583

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rpm/SPECS/crowdsec-firewall-bouncer.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ START=1
6969

7070
if grep -q '${BACKEND}' "$CONFIG"; then
7171
newconfig=$(BACKEND="iptables" envsubst '$BACKEND' < "$CONFIG")
72-
echo "$newconfig" | install -m 0600 /dev/stdin "$CONFIG"
72+
(umask 177 && echo "$newconfig" > "$CONFIG")
7373
fi
7474

7575
if [ "$1" = "1" ]; then
@@ -147,7 +147,7 @@ START=1
147147

148148
if grep -q '${BACKEND}' "$CONFIG"; then
149149
newconfig=$(BACKEND="nftables" envsubst '$BACKEND' < "$CONFIG")
150-
echo "$newconfig" | install -m 0600 /dev/stdin "$CONFIG"
150+
(umask 177 && echo "$newconfig" > "$CONFIG")
151151
fi
152152

153153
if [ "$1" = "1" ]; then

0 commit comments

Comments
 (0)