optimize the dkms init script to be less greedy at boot time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dkms (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: dkms
The dkms_autoinstall script is noticeable in bootcharts of karmic on the Dell Mini 10V reference hardware. In the general case, dkms should have nothing to do at boot time because the modules will already be around from the previous boot; so it would be nice to have this script more efficiently detect that it doesn't need to do anything.
I've identified three changes that I think will make the script more efficient (but haven't tested this yet):
- consolidate our walking of /var/lib/dkms to use a single call to find, avoiding multiple stat() calls for each file
- avoid forking grep for a string match, use case instead
- port to POSIX sh, so that we can spawn /bin/ash instead of /bin/bash.
Patch to follow.
ProblemType: Bug
Architecture: amd64
Date: Tue Nov 17 12:33:56 2009
DistroRelease: Ubuntu 9.10
Package: dkms (not installed)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: dkms
Uname: Linux 2.6.31-15-generic x86_64
Related branches
Changed in dkms (Ubuntu): | |
assignee: | nobody → Scott James Remnant (scott) |
Changed in dkms (Ubuntu): | |
assignee: | Scott James Remnant (scott) → nobody |
Changed in dkms (Ubuntu): | |
importance: | Undecided → Medium |
This doesn't work. Attached is a proposed diff based on Steve patchset. It needs review and testing.