Hi everyone, While using awsetbg I ran into a small bug. the wallpaper setter detection gives false positive result (with FreeBSD's sh, which is ash). awsetbg try to use 'hash $setter' and check the return value. Unfortunalty ash return always 0, even if $setter is not hashed. which(1) works fine and match what we wanna do.
Patch attached ;) Regards, Perrin Alexandre.
From e647a182d84c68821f65eaad0d3dca139e97e1c1 Mon Sep 17 00:00:00 2001
From: Perrin "kAworu" Alexandre <kaworu(a)kaworu,ch>
Date: Sun, 18 Jan 2009 16:39:26 +0100
Subject: [PATCH] fix wallpapersetter detection
Signed-off-by: Perrin "kAworu" Alexandre <kaworu(a)kaworu,ch>
---
utils/awsetbg | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/utils/awsetbg b/utils/awsetbg
index 347d4f9..5d6f6e1 100755
--- a/utils/awsetbg
+++ b/utils/awsetbg
@@ -117,7 +117,7 @@ EOF
}
find_it() {
- [ -n "$1" ] && hash $1 2> /dev/null
+ [ -n "$1" ] && which $1 1>/dev/null 2>&1
}
message() {
--
1.6.0.6
signature.asc
Description: This is a digitally signed message part.
