Merge lp:~superm1/hw-detect/dell-driver-injection-disk into lp:~ubuntu-core-dev/hw-detect/ubuntu

Proposed by Mario Limonciello
Status: Merged
Merged at revision: not available
Proposed branch: lp:~superm1/hw-detect/dell-driver-injection-disk
Merge into: lp:~ubuntu-core-dev/hw-detect/ubuntu
Diff against target: None lines
To merge this branch: bzr merge lp:~superm1/hw-detect/dell-driver-injection-disk
Reviewer Review Type Date Requested Status
VCS imports Pending
Review via email: mp+4392@code.launchpad.net
To post a comment you must log in.
113. By Mario Limonciello

revert r110 since we are not changing the syntax for mountmedia to use the firmware keyword

114. By Mario Limonciello

pull in the safe shell code from localechooser to find out where we are storing our driver disks at

115. By Mario Limonciello

merge with main ~ubuntu-core-dev/hw-detect/ubuntu branch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2008-11-04 23:42:42 +0000
3+++ Makefile 2009-03-12 04:59:31 +0000
4@@ -32,7 +32,7 @@
5 rm -f *.o
6 rm -f archdetect
7
8-install: install-hw-detect install-ethdetect install-disk-detect install-archdetect install-archdetect-deb
9+install: install-hw-detect install-ethdetect install-disk-detect install-driver-injection-disk-detect install-archdetect install-archdetect-deb
10
11 install-hw-detect: hw-detect.sh
12 $(INSTALL) -d $(bindir)
13@@ -72,6 +72,10 @@
14 $(INSTALL) -d $(bindir)
15 $(INSTALL) disk-detect.sh $(bindir)/disk-detect
16
17+install-driver-injection-disk-detect: driver-injection-disk.sh
18+ $(INSTALL) -d $(bindir)
19+ $(INSTALL) driver-injection-disk.sh $(bindir)/driver-injection-disk
20+
21 install-archdetect: archdetect
22 $(INSTALL) -d $(bindir)
23 $(INSTALL) archdetect $(bindir)
24
25=== modified file 'check-missing-firmware.sh'
26--- check-missing-firmware.sh 2008-09-14 20:14:32 +0000
27+++ check-missing-firmware.sh 2009-03-12 04:58:25 +0000
28@@ -111,7 +111,7 @@
29 # Try to load udebs (or debs) that contain the missing firmware.
30 # This does not use anna because debs can have arbitrary
31 # dependencies, which anna might try to install.
32- if mountmedia driver; then
33+ if mountmedia firmware; then
34 echo "$files" | sed -e 's/ /\n/g' >/tmp/grepfor
35 for filename in /media/*.deb /media/*.udeb /media/*.ude /media/firmware/*.deb /media/firmware/*.udeb /media/firmware/*.ude; do
36 if [ -f "$filename" ]; then
37
38=== modified file 'debian/changelog'
39--- debian/changelog 2009-03-04 16:33:01 +0000
40+++ debian/changelog 2009-03-12 05:00:21 +0000
41@@ -1,3 +1,11 @@
42+hw-detect (1.71ubuntu6) UNRELEASED; urgency=low
43+
44+ * Add support for Dell Driver Injection disk v1, an integrated flash media based
45+ solution for adding in drivers after OS launches. This feature will be on
46+ upcoming Dell servers. (LP: #341526)
47+
48+ -- Mario Limonciello <mario_limonciello@dell.com> Wed, 11 Mar 2009 13:26:55 -0500
49+
50 hw-detect (1.71ubuntu5) jaunty; urgency=low
51
52 * Use 'update-dev --settle' rather than 'update-dev' after loading modules
53
54=== modified file 'debian/control'
55--- debian/control 2009-03-02 14:13:00 +0000
56+++ debian/control 2009-03-12 04:59:31 +0000
57@@ -33,6 +33,15 @@
58 XB-Installer-Menu-Item: 3500
59 Description: Detect disk drives
60
61+Package: driver-injection-disk-detect
62+XC-Package-Type: udeb
63+Architecture: all
64+Depends: hw-detect, mountmedia
65+Priority: optional
66+Enhances: hw-detect
67+XB-Installer-Menu-Item: 1500
68+Description: Detect OEM driver injection disks
69+
70 Package: archdetect
71 XC-Package-Type: udeb
72 Architecture: any
73
74=== added file 'debian/driver-injection-disk-detect.postinst'
75--- debian/driver-injection-disk-detect.postinst 1970-01-01 00:00:00 +0000
76+++ debian/driver-injection-disk-detect.postinst 2009-03-12 04:59:31 +0000
77@@ -0,0 +1,4 @@
78+#!/bin/sh
79+set -e
80+
81+driver-injection-disk
82
83=== added file 'debian/driver-injection-disk-detect.templates'
84--- debian/driver-injection-disk-detect.templates 1970-01-01 00:00:00 +0000
85+++ debian/driver-injection-disk-detect.templates 2009-03-12 04:59:31 +0000
86@@ -0,0 +1,13 @@
87+Template: debian-installer/driver-injection-disk-detect/title
88+Type: text
89+# Main menu item
90+# :sl1:
91+_Description: Detect OEM driver injection disks
92+
93+Template: driver-injection-disk/load
94+Type: boolean
95+# :sl2:
96+_Description: Load OEM supported drivers from driver injection disk?
97+ Your OEM has prepared internal media that contains the drivers you may
98+ need for supporting this hardware with this OS release.
99+
100
101=== added file 'driver-injection-disk.sh'
102--- driver-injection-disk.sh 1970-01-01 00:00:00 +0000
103+++ driver-injection-disk.sh 2009-03-12 04:59:31 +0000
104@@ -0,0 +1,48 @@
105+#!/bin/sh
106+set -e
107+. /usr/share/debconf/confmodule
108+
109+log () {
110+ logger -t driver-injection-disk "$@"
111+}
112+
113+check_deb_arch () {
114+ arch=$(ar p "$1" control.tar.gz | tar zxO ./control | grep '^Architecture:' | sed -e 's/Architecture: *//')
115+ [ "$arch" = all ] || [ "$arch" = "$(udpkg --print-architecture)" ]
116+}
117+
118+install_driver_pkg () {
119+ if echo "$1" | grep -q '\.deb$'; then
120+ # cache deb for installation into /target later
121+ mkdir -p /var/cache/firmware/
122+ cp -a "$1" /var/cache/firmware/ || true
123+ udpkg --unpack "/var/cache/firmware/$(basename "$1")"
124+ else
125+ udpkg --unpack "$1"
126+ fi
127+}
128+
129+#try to mount possible driver disk
130+for device in $(list-devices usb-partition); do
131+ label=$(/sbin/vol_id --label $device 2>/dev/null || true)
132+ if [ "$label" = "OEMDRV" ]; then
133+ db_input high driver-injection-disk/load || true
134+ if ! db_go; then
135+ exit 10 # back up
136+ fi
137+ db_get driver-injection-disk/load
138+ if [ "$RET" = true ]; then
139+ if mountmedia driver-injection-disk; then
140+ dir=/media/ubuntu/$(grep DISTRIB_RELEASE /etc/lsb-release | cut -d"=" -f2)
141+ for filename in $dir/*.deb $dir/*.udeb $dir/*.ude; do
142+ if [ -f "$filename" ] && check_deb_arch "$filename"; then
143+ log "installing driver package $filename"
144+ install_driver_pkg "$filename" || true
145+ fi
146+ done
147+ fi
148+ umount /media || true
149+ fi
150+ fi
151+done
152+

Subscribers

People subscribed via source and target branches

to all changes: