aboutsummaryrefslogtreecommitdiff
path: root/util/fbsetbg
diff options
context:
space:
mode:
Diffstat (limited to 'util/fbsetbg')
-rw-r--r--util/fbsetbg8
1 files changed, 6 insertions, 2 deletions
diff --git a/util/fbsetbg b/util/fbsetbg
index 0bdb804..e277317 100644
--- a/util/fbsetbg
+++ b/util/fbsetbg
@@ -505,7 +505,11 @@ if [ "$option" = random ]; then
505 randomnumber=`random_number` 505 randomnumber=`random_number`
506 # some shells don't support $RANDOM 506 # some shells don't support $RANDOM
507 elif [ -z "$RANDOM" ]; then 507 elif [ -z "$RANDOM" ]; then
508 randomnumber=`(echo $$ ;time ps; w ; date )2>&1 | cksum | cut -f1 -d' '` 508 if [ -r /dev/urandom ]; then
509 randomnumber=`hexdump -n 2 -e '/2 "%u"' /dev/urandom`
510 else
511 randomnumber=`(echo $$; ps; w; date) 2>&1 | cksum | cut -f1 -d' '`
512 fi
509 else 513 else
510 randomnumber="$RANDOM" 514 randomnumber="$RANDOM"
511 fi 515 fi
@@ -526,7 +530,7 @@ fi
526 530
527 531
528if [ ! -r "$wallpaper" ]; then 532if [ ! -r "$wallpaper" ]; then
529 if [ "$ignore_missing_wallpaper" == "true" ]; then 533 if [ "$ignore_missing_wallpaper" = "true" ]; then
530 exit 0 534 exit 0
531 fi 535 fi
532 message "Can't find wallpaper $wallpaper" 536 message "Can't find wallpaper $wallpaper"