Bug 220468

Summary: nvidia-glx.i broken and misclassified as daemon
Product: [Fedora] Fedora Reporter: Jason Farrell <farrellj>
Component: initng-ifilesAssignee: Daniel Malmgren <dm>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-22 08:15:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch against old none

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.