openbsd-ports/x11/fluxbox/patches/patch-util_fbsetbg
dcoppa de1a79ce07 Update to fluxbox-1.3.3.
Tested on sparc64.
Tested by bcallah@ on amd64 and loongson.

OK bcallah@
2013-01-11 08:11:26 +00:00

30 lines
1020 B
Plaintext

$OpenBSD: patch-util_fbsetbg,v 1.1 2013/01/11 08:11:26 dcoppa Exp $
Remove bashisms
(upstream git commit dcdfdfd56b5dbb6453062ad60876647b11433f18)
--- util/fbsetbg.orig Mon Dec 10 18:26:53 2012
+++ util/fbsetbg Thu Jan 10 11:45:28 2013
@@ -505,7 +505,11 @@ if [ "$option" = random ]; then
randomnumber=`random_number`
# some shells don't support $RANDOM
elif [ -z "$RANDOM" ]; then
- randomnumber=`(echo $$ ;time ps; w ; date )2>&1 | cksum | cut -f1 -d' '`
+ if [ -r /dev/urandom ]; then
+ randomnumber=`hexdump -n 2 -e '/2 "%u"' /dev/urandom`
+ else
+ randomnumber=`(echo $$; ps; w; date) 2>&1 | cksum | cut -f1 -d' '`
+ fi
else
randomnumber="$RANDOM"
fi
@@ -526,7 +530,7 @@ fi
if [ ! -r "$wallpaper" ]; then
- if [ "$ignore_missing_wallpaper" == "true" ]; then
+ if [ "$ignore_missing_wallpaper" = "true" ]; then
exit 0
fi
message "Can't find wallpaper $wallpaper"