* Updated the splash screen support for Linux >= 2.6.25.
svn path=/nixos/trunk/; revision=12030
This commit is contained in:
parent
a49eb4d1f9
commit
a20f4aff60
|
@ -121,14 +121,15 @@ rec {
|
|||
}
|
||||
] ++
|
||||
pkgs.lib.optionals
|
||||
(config.boot.initrd.enableSplashScreen && kernelPackages.kernel.features ? fbSplash)
|
||||
(config.boot.initrd.enableSplashScreen && kernelPackages.splashutils != null)
|
||||
[
|
||||
{ object = pkgs.runCommand "splashutils" {} ''
|
||||
{ object = pkgs.runCommand "splashutils" {allowedReferences = []; buildInputs = [pkgs.nukeReferences];} ''
|
||||
ensureDir $out/bin
|
||||
cp ${kernelPackages.splashutils}/bin/splash_helper $out/bin
|
||||
cp ${kernelPackages.splashutils}/${kernelPackages.splashutils.helperName} $out/bin/splash_helper
|
||||
nuke-refs $out/bin/*
|
||||
'';
|
||||
suffix = "/bin/splash_helper";
|
||||
symlink = "/sbin/splash_helper";
|
||||
symlink = "/${kernelPackages.splashutils.helperName}";
|
||||
}
|
||||
{ object = import ../helpers/unpack-theme.nix {
|
||||
inherit (pkgs) stdenv;
|
||||
|
|
|
@ -409,7 +409,7 @@ let
|
|||
)
|
||||
|
||||
# Transparent TTY backgrounds.
|
||||
++ optional (config.services.ttyBackgrounds.enable && kernelPackages.kernel.features ? fbSplash)
|
||||
++ optional (config.services.ttyBackgrounds.enable && kernelPackages.splashutils != null)
|
||||
(import ../upstart-jobs/tty-backgrounds.nix {
|
||||
inherit (pkgs) stdenv;
|
||||
inherit (kernelPackages) splashutils;
|
||||
|
|
|
@ -21,39 +21,38 @@ rec {
|
|||
}
|
||||
];
|
||||
|
||||
job = "
|
||||
start on hardware-scan
|
||||
job = ''
|
||||
start on hardware-scan
|
||||
|
||||
start script
|
||||
start script
|
||||
|
||||
# Critical: tell the kernel where to find splash_helper. It calls
|
||||
# this program every time we switch between consoles.
|
||||
echo ${splashutils}/bin/splash_helper > /proc/sys/kernel/fbsplash
|
||||
# Critical: tell the kernel where to find splash_helper. It calls
|
||||
# this program every time we switch between consoles.
|
||||
echo ${splashutils}/${splashutils.helperName} > ${splashutils.helperProcFile}
|
||||
|
||||
# For each console...
|
||||
for tty in ${toString (map (x: x.tty) backgrounds)}; do
|
||||
# Make sure that the console exists.
|
||||
echo -n '' > /dev/tty$tty
|
||||
# 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
|
||||
${splashutils}/bin/splash_util --tty $tty -c on || true
|
||||
done
|
||||
# Set the theme as determined by tty-backgrounds-combine.sh
|
||||
# above.
|
||||
theme=$(readlink ${themesUnpacked}/$tty)
|
||||
${splashutils}/${splashutils.controlName} --tty $tty -c setcfg -t $theme || true
|
||||
${splashutils}/${splashutils.controlName} --tty $tty -c setpic -t $theme || true
|
||||
${splashutils}/${splashutils.controlName} --tty $tty -c on || true
|
||||
done
|
||||
|
||||
end script
|
||||
end script
|
||||
|
||||
respawn sleep 10000 # !!! Hack
|
||||
respawn sleep 10000 # !!! Hack
|
||||
|
||||
stop script
|
||||
# Disable the theme on each console.
|
||||
for tty in ${toString (map (x: x.tty) backgrounds)}; do
|
||||
${splashutils}/bin/splash_util --tty $tty -c off || true
|
||||
done
|
||||
end script
|
||||
|
||||
";
|
||||
stop script
|
||||
# Disable the theme on each console.
|
||||
for tty in ${toString (map (x: x.tty) backgrounds)}; do
|
||||
${splashutils}/${splashutils.controlName} --tty $tty -c off || true
|
||||
done
|
||||
end script
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue