File: 50install-firmware

package info (click to toggle)
hw-detect 1.107
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,496 kB
  • sloc: sh: 1,306; makefile: 98; ansic: 39
file content (27 lines) | stat: -rwxr-xr-x 557 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
set -e
. /usr/share/debconf/confmodule

# copy any loose firmware files to /target (incl. subdirs)
if [ -d /lib/firmware ]; then
	for f in /lib/firmware/*; do
		if [ -e "$f" ]; then
			mkdir -p /target/lib/firmware/
			cp -a "$f" /target/lib/firmware/
		fi
	done
fi

# enable non-free repository if any firmware / injected drivers are
# detected.
if [ -d /var/cache/firmware ]; then
	for deb in /var/cache/firmware/*.deb; do
		if [ -f "$deb" ]; then
			need_nonfree=1
		fi
	done
fi

if [ "$need_nonfree" ]; then
	db_set apt-setup/non-free true
fi