Ver código fonte

all errors should be printed to stderr

Git-Dch: Ignore
David Kalnischkies 12 anos atrás
pai
commit
84b286f65c
1 arquivos alterados com 5 adições e 5 exclusões
  1. 5 5
      cmdline/apt-key.in

+ 5 - 5
cmdline/apt-key.in

@@ -43,7 +43,7 @@ aptkey_echo() { echo "$@"; }
 
 
 requires_root() {
 requires_root() {
 	if [ "$(id -u)" -ne 0 ]; then
 	if [ "$(id -u)" -ne 0 ]; then
-		echo >&1 "ERROR: This command can only be used by root."
+		echo >&2 "ERROR: This command can only be used by root."
 		exit 1
 		exit 1
 	fi
 	fi
 }
 }
@@ -63,11 +63,11 @@ add_keys_with_verify_against_master_keyring() {
     MASTER=$2
     MASTER=$2
 
 
     if [ ! -f "$ADD_KEYRING" ]; then
     if [ ! -f "$ADD_KEYRING" ]; then
-	echo "ERROR: '$ADD_KEYRING' not found"
+	echo >&2 "ERROR: '$ADD_KEYRING' not found"
 	return
 	return
-    fi 
+    fi
     if [ ! -f "$MASTER" ]; then
     if [ ! -f "$MASTER" ]; then
-	echo "ERROR: '$MASTER' not found"
+	echo >&2 "ERROR: '$MASTER' not found"
 	return
 	return
     fi
     fi
 
 
@@ -175,7 +175,7 @@ update() {
 	    fi
 	    fi
 	done
 	done
     else
     else
-	echo "Warning: removed keys keyring  $REMOVED_KEYS missing or not readable" >&2
+	echo >&2 "Warning: removed keys keyring  $REMOVED_KEYS missing or not readable"
     fi
     fi
 }
 }