From fb2d9f83479f4a8038a5bbab480c5cd8a52b7a65 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 9 Jan 2007 13:56:54 +0000 Subject: [PATCH] * Race condition: splash_util fails if the virtual console doesn't exist yet (e.g., because mingetty hasn't started yet), so make sure it exists. svn path=/nixos/trunk/; revision=7584 --- upstart-jobs/tty-backgrounds.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/upstart-jobs/tty-backgrounds.nix b/upstart-jobs/tty-backgrounds.nix index abe6f52305ab..3956d9fb8b49 100644 --- a/upstart-jobs/tty-backgrounds.nix +++ b/upstart-jobs/tty-backgrounds.nix @@ -27,9 +27,13 @@ start script # this program every time we switch between consoles. echo ${splashutils}/bin/splash_helper > /proc/sys/kernel/fbsplash - # Set the theme for each console, as determined by - # tty-backgrounds-combine.sh above. + # For each console... for tty in ${toString (map (x: x.tty) backgrounds)}; do + # Make sure that the console exists. + echo -n '' > /dev/tty$tty + + # Set the theme as determined by tty-backgrounds-combine.sh + # above. theme=$(readlink ${themesUnpacked}/$tty) ${splashutils}/bin/splash_util --tty $tty -c setcfg -t $theme || true ${splashutils}/bin/splash_util --tty $tty -c setpic -t $theme || true