summaryrefslogtreecommitdiff
path: root/src/share/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/common')
-rw-r--r--src/share/common9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/share/common b/src/share/common
index 83f2d6f..83120d1 100644
--- a/src/share/common
+++ b/src/share/common
@@ -354,12 +354,15 @@ remove_monkeysphere_lines() {
file="$1"
- if [ -z "$file" ] ; then
+ # return error if file does not exist
+ if [ ! -e "$file" ] ; then
return 1
fi
- if [ ! -e "$file" ] ; then
- return 1
+ # just return ok if the file is empty, since there aren't any
+ # lines to remove
+ if [ ! -s "$file" ] ; then
+ return 0
fi
tempfile=$(mktemp "${file}.XXXXXXX") || \