Skip to content

Commit a2b3992

Browse files
committed
Tools: unitc avoid interactive rm(1) invocations.
1 parent 9c94cfc commit a2b3992

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/unitc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ if [ $REMOTE -eq 0 ]; then
161161

162162
# Cache the discovery for this unit PID (and cleanup any old files)
163163
#
164-
rm /tmp/${0##*/}.* 2> /dev/null
164+
rm -f /tmp/${0##*/}.* 2> /dev/null
165165
echo UNIT_CTRL=\"${UNIT_CTRL}\" > /tmp/${0##*/}.$PID.env
166166
echo ERROR_LOG=${ERROR_LOG} >> /tmp/${0##*/}.$PID.env
167167
fi
@@ -221,11 +221,11 @@ if [ $CURL_STATUS -ne 0 ]; then
221221
echo "${0##*/}: Check that you have permission to access the Unit control socket, or try again with sudo(8)"
222222
else
223223
echo "${0##*/}: Trying to access $UNIT_CTRL$URI"
224-
cat /tmp/${0##*/}.$$ && rm /tmp/${0##*/}.$$
224+
cat /tmp/${0##*/}.$$ && rm -f /tmp/${0##*/}.$$
225225
fi
226226
exit 4
227227
fi
228-
rm /tmp/${0##*/}.$$ 2> /dev/null
228+
rm -f /tmp/${0##*/}.$$ 2> /dev/null
229229

230230
if [ $SHOW_LOG -gt 0 ] && [ $NOLOG -eq 0 ] && [ $QUIET -eq 0 ]; then
231231
echo -n "${0##*/}: Waiting for log..."

0 commit comments

Comments
 (0)