From 0356d2eeff9f35ac6e33c926d41ad9cbca8a9103 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 23 Mar 2011 17:45:03 +0100 Subject: [PATCH] also check if sources file is not empty Signed-off-by: Steven Armstrong --- conf/type/__apt_ppa/explorer/state | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/type/__apt_ppa/explorer/state b/conf/type/__apt_ppa/explorer/state index 69af1937..86c401a4 100755 --- a/conf/type/__apt_ppa/explorer/state +++ b/conf/type/__apt_ppa/explorer/state @@ -28,5 +28,7 @@ name="$__object_id" repo_name="${name#ppa:}" repo_file_name="$(echo "$repo_name" | sed "s:\/:\-:")-${DISTRIB_CODENAME}.list" -[ -f "/etc/apt/sources.list.d/${repo_file_name}" ] && echo enabled || echo disabled +[ -f "/etc/apt/sources.list.d/${repo_file_name}" -a \ + -s "/etc/apt/sources.list.d/${repo_file_name}" ] \ + && echo enabled || echo disabled