]>
Commit | Line | Data |
---|---|---|
f493aec2 TG |
1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings FATAL => 'all'; | |
5 | ||
7022d096 | 6 | my $firmware_tarball = '/mnt/vendorfw/firmware.tar'; |
f493aec2 TG |
7 | my @vfat_devices; |
8 | ||
9 | for (`blkid`) { | |
10 | if (/^([^:]+):.*vfat/) { | |
11 | push @vfat_devices, $1; | |
12 | } | |
13 | } | |
14 | ||
15 | for my $dev (@vfat_devices) { | |
16 | system("mount -o ro $dev /mnt"); | |
57c1ec2a | 17 | if (-f $firmware_tarball) { |
f493aec2 | 18 | system("tar -C /lib/firmware/ -xf $firmware_tarball"); |
eeaa52fd | 19 | unlink('/etc/modprobe.d/blacklist.conf'); |
f493aec2 TG |
20 | system('modprobe brcmfmac'); |
21 | } | |
22 | system('umount /mnt'); | |
f493aec2 | 23 | } |