Bug 220468 - nvidia-glx.i broken and misclassified as daemon
Summary: nvidia-glx.i broken and misclassified as daemon
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: initng-ifiles
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Malmgren
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-21 15:50 UTC by Jason Farrell
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-22 08:15:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch against old (1.25 KB, patch)
2006-12-21 16:05 UTC, Jason Farrell
no flags Details | Diff

Description Jason Farrell 2006-12-21 15:50:54 UTC
Description of problem:
nvidia-glx.i fails to start in FC6 for a variety of reasons.
1) because of a bash if/then syntax error
2) invalid "return $retval" which should be "exit ${retval}"
3) /dev/nvidia* devices missing

Also, this script should really be moved to system/nvidia-glx.i, since it only
updates /etc/X11/xorg.conf once when run.

Version-Release number of selected component (if applicable):
initng-ifiles-0.0.6-2.fc6

How reproducible:
Always

Steps to Reproduce:
1. install the official nvidia kmod from livna
2. ng-update add daemon/nvidia-glx
3. reboot
  
Actual results:
X won't start because of syntax errors in nvidia-glx.i and because of missing
/dev/nvidia* devices.

Expected results:
nvidia device files installed, and service starts.

Additional info:
Below is my working version for FC6:

#!/sbin/itype
# This is a i file, used by initng parsed by install_service

service daemon/nvidia-glx {
        need = system/bootmisc;
        env_file = /etc/sysconfig/nvidia-config-display;

        script start = {
                [ ! -f /dev/nvidiactl ] && cp -a /etc/udev/devices/nvidia* /dev
                echo "Checking for nvidia kernel module..."
                module="/lib/modules/`uname -r`/extra/nvidia/nvidia.ko"
                if [ -f $module ]; then
                        echo "Enabling nvidia-glx driver"
                        /usr/sbin/nvidia-config-display enable
                else
                        echo "`basename ${module}` module for `uname -r` kernel
not found"
                        echo "Disabling nvidia-glx driver"
                        /usr/sbin/nvidia-config-display disable
                fi
                retval=$?
                [ "$retval" == "0" ] && /bin/touch /var/lock/subsys/nvidia-glx
                exit ${retval}
        };

        script stop = {
                /usr/sbin/nvidia-config-display disable
                retval=$?
                [ "$retval" -eq "0" ] && /bin/rm -f /var/lock/subsys/nvidia-glx
                exit ${retval}
        }
}

Comment 1 Jason Farrell 2006-12-21 16:05:02 UTC
Created attachment 144193 [details]
patch against old

Comment 2 Daniel Malmgren 2006-12-22 08:15:42 UTC
Thanks for your report. This script is now fixed in svn (thanks deac). The
copying of stuff from /etc/udev/devices isn't really needed anymore though,
since we've now added a proper copying (in svn) of entire /etc/udev/devices to
system/udev/filldev which is earlier in the boot order.

I don't think it's really clear why the script should be moved from daemon to
system. The difference between daemon and system practically makes no difference
other than estethical, and it's very unclear what belongs where...

Comment 3 Daniel Malmgren 2006-12-22 08:25:24 UTC
Sorry. Guess this one shouldn't be closed as UPSTREAM but NEXTRELEASE.


Note You need to log in before you can comment on or make changes to this bug.