misc/134006: Unload console screensaver kernel modules if saver is
disabled in rc.conf
Volker Theile
votdev at gmx.de
Sat Apr 25 20:50:04 UTC 2009
>Number: 134006
>Category: misc
>Synopsis: Unload console screensaver kernel modules if saver is disabled in rc.conf
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Apr 25 20:50:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Volker Theile
>Release:
>Organization:
FreeNAS
>Environment:
FreeBSD vmbsd72i386 7.2-RC2 FreeBSD 7.2-RC2 #0: Thu Apr 23 22:07:24 UTC 2009 root at walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
If a console screensaver kernel module is loaded and active and i remove the 'saver="xxx"' rc.conf variable or set it to 'saver=""' the saver kernel module is not unloaded when i execute '/etc/rc.d/syscons restart'. With the attached patch this will be done.
>How-To-Repeat:
1. Configure a console saver in rc.conf:
saver="green"
2. Start it
# /etc/rc.d/syscons start
# kldstat
Id Refs Address Size Name
1 5 0xc0400000 9fab28 kernel
2 1 0xc0dfb000 6a45c acpi.ko
3 1 0xc2e8b000 2000 green_saver.ko
3. Remove or unset console saver in rc.conf:
saver=""
4. Restart syscons
# /etc/rc.d/syscons restart
# kldstat
Id Refs Address Size Name
1 5 0xc0400000 9fab28 kernel
2 1 0xc0dfb000 6a45c acpi.ko
3 1 0xc2e8b000 2000 green_saver.ko
5. Apply patch and restart syscons
# /etc/rc.d/syscons restart
# kldstat
Id Refs Address Size Name
1 3 0xc0400000 9fab28 kernel
2 1 0xc0dfb000 6a45c acpi.ko
>Fix:
--- syscons.orig 2009-04-23 20:16:16.000000000 +0000
+++ syscons 2009-04-25 19:30:35.000000000 +0000
@@ -205,14 +205,14 @@
# screen saver
#
+ for i in `kldstat | awk '$5 ~ "_saver\.ko$" { print $5 }'`; do
+ kldunload ${i}
+ done
case ${saver} in
[Nn][Oo] | '')
;;
*)
echo -n ' screensaver'
- for i in `kldstat | awk '$5 ~ "_saver\.ko$" { print $5 }'`; do
- kldunload ${i}
- done
load_kld -e _saver ${saver}_saver
;;
esac
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list