Browse Source

initial push of forked siduction-scripts

master
Ferdinand Thommes 9 years ago
commit
158e60a7ad
27 changed files with 3609 additions and 0 deletions
  1. 5
    0
      Makefile
  2. 75
    0
      burniso
  3. 28
    0
      burniso.1
  4. 838
    0
      debian/changelog
  5. 1
    0
      debian/compat
  6. 34
    0
      debian/control
  7. 26
    0
      debian/copyright
  8. 13
    0
      debian/install
  9. 2
    0
      debian/manpages
  10. 4
    0
      debian/rules
  11. 1
    0
      debian/source/format
  12. 26
    0
      fix-dpi-kdm
  13. 11
    0
      fix-ssh
  14. 26
    0
      fix-time
  15. 376
    0
      fw
  16. 61
    0
      fw-data-convert
  17. 473
    0
      fw-data.ini
  18. 63
    0
      fw-detect
  19. 39
    0
      fw-detect.1
  20. 378
    0
      fw-html
  21. 81
    0
      get-resume-partition
  22. 65
    0
      inetconn
  23. 114
    0
      kvercmp
  24. 12
    0
      remove-gateway
  25. 12
    0
      remove-orphans
  26. 16
    0
      siduction-paste
  27. 829
    0
      wgetpaste

+ 5
- 0
Makefile View File

@@ -0,0 +1,5 @@
#!/usr/bin/make -f
build:
./fw-data-convert > fw-data.sh
clean:
-rm -rf fw-data.sh

+ 75
- 0
burniso View File

@@ -0,0 +1,75 @@
#!/bin/bash

# Burn ISO images from the command line.
# see "man burniso"

# wodim parameters
SPEED="8"
FS="14M"
OPTIONS="-dao -eject -v"

set -e
shopt -s nullglob
shopt -s nocaseglob

# Print out an error message and exit.
error () {
echo >&2 "Error: ${*}"
exit 1
}

# Look for writeable devices.
devices=$(awk '
/^drive name/ {
sub(/^.*:[[:space:]]*/, "")
num_dev = split($0, devices)
}
/(write CD)|(write DVD)/ {
sub(/^.*:[[:space:]]*/, "")
split($0, entries)
for (i = 1; i <= num_dev; ++i)
if (entries[i] == 1)
printf("/dev/%s\n", devices[i])
}' /proc/sys/dev/cdrom/info | uniq)

case $(echo ${devices} | wc -w) in
0) error "No suitable device found!"
;;
1) device=$devices
;;
*) select device in $devices; do
break
done
;;
esac

# Check write permission for device.
if [ ! -w "${device}" ]; then
error "No write permission for ${device}!".
fi

printf "Using device %s.\n" "${device}"

if [ -z "$(echo *.iso)" ]; then
error "No ISO images in current directory!"
fi

printf "Choose an ISO to burn: \n"
select iso in *.iso; do
break
done

# Check if ISO exists.
if ! [ -f "${iso}" ]; then
error "No ISO in currect directory!"
fi
printf "File %s chosen.\n" "${iso}"

# Look for MD5 checksum and validate if available.
if [ -f "${iso}.md5" ]; then
echo "MD5 checksum found. Verifying ISO..."
if ! md5sum -c "${iso}.md5"; then
error "Invalid MD5 checksum!"
fi
fi
exec wodim ${OPTIONS} "dev=${device}" "fs=${FS}" "speed=${SPEED}" "${iso}"

+ 28
- 0
burniso.1 View File

@@ -0,0 +1,28 @@
.TH "BURNISO" "1" "2009-02-16" "Linux"
.SH "NAME"
burniso \- Burn ISO images on the command line
.SH "SYNOPSIS"
.BR burniso
.SH "DESCRIPTION"
.LP
.BR burniso
burns ISO images on media, using Disk-At-Once mode and a hardcoded speed
of 8x.
It is a trivial command\-line frontend to wodim.
A selection of ISO images in the current directory is presented.
It starts burning right after selection of the ISO.
So be sure you have your media inserted.
.SH BUGS
Report all suggestions and bugs to:
.LP
Michael Deelwater <michael.deelwater@googlemail.com>
.SH "EXAMPLE"
.LP
To run this program the standard way type:
.LP
cd
.I "/dir/containing/your/ISO"
burniso
.SH "SEE ALSO"
.LP
.BR wodim (1)

+ 838
- 0
debian/changelog View File

@@ -0,0 +1,838 @@
aptosid-scripts (0.4.14) UNRELEASED; urgency=low

-- Ferdinand Thommes <devil@siduction.org> Thur,13 Oct 2011 23:40:43 +0200
* adapted aptosid-scripts for siduction

* NOT RELEASED YET
* update firmware db:
- Realtek 8192C/8188C 802.11n PCI wireless
- Realtek 8192S/8191S 802.11n PCI wireless

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 26 Jul 2011 19:38:25 +0200

aptosid-scripts (0.4.13) unstable; urgency=low

* bump standards version to 3.9.2, no changes necessary.
* update eMail addresses.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Fri, 29 Apr 2011 03:57:09 +0200

aptosid-scripts (0.4.12) unstable; urgency=low

* set default paste service to pocoo, currently the only one supporting
pastes >64Kb

-- Joaquim Boura <x-un-i@berlios.de> Fri, 11 Mar 2011 21:23:37 +0100

aptosid-scripts (0.4.11) unstable; urgency=low

* drop transitional meta package.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Fri, 21 Jan 2011 13:45:51 +0100

aptosid-scripts (0.4.10) unstable; urgency=low

* update firmware db:
- Atheros AR7010
- Realtek RTL8111D(L)
- Realtek RTL8188S 150/ RTL8191S 300 MBit/s USB WiFi cards (r8712u)
- disambiguate Broadcom b43 and b43legacy, firmware-b43-lpphy-installer is
now preferred for all non-legacy chipsets with ucode > 10.
- Broadcom 802.11n wireless LAN driver brcm80211.
- Atheros AR30xx Bluetooth chipset

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sun, 26 Dec 2010 18:08:57 +0100

aptosid-scripts (0.4.9) unstable; urgency=low

* fixed empty value for wodim option making the script unusable

-- Joaquim Boura <x-un-i@berlios.de> Mon, 08 Nov 2010 18:01:52 +0100

aptosid-scripts (0.4.8) unstable; urgency=low

* fix hjt's mail address.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 06 Oct 2010 15:33:39 +0200

aptosid-scripts (0.4.7) unstable; urgency=low

* fix x-un-i's mail address.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 06 Oct 2010 14:36:04 +0200

aptosid-scripts (0.4.6) unstable; urgency=low

* Fix typo (s/CUSTOM_DPI/DPI/) in fix-dpi-kdm script. Thanks to
"seagull" on the forum for reporting it broken.
* Remove grub menu.lst reference from get-resume-partition.

-- Kel Modderman <kel@otaku42.de> Tue, 21 Sep 2010 17:57:46 +1000

aptosid-scripts (0.4.5) unstable; urgency=low

* New upstream version for wgetpaste. going back to pastebin.

-- Joaquim Boura <x-un-i@berlios.de> Sat, 18 Sep 2010 00:03:58 +0200

aptosid-scripts (0.4.4) unstable; urgency=low

* adapt URLs to download firmware images from git.kernel.org.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Fri, 17 Sep 2010 18:50:12 +0200

aptosid-scripts (0.4.3) unstable; urgency=low

* s/802.11/IEEE802.11/

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Mon, 13 Sep 2010 22:48:35 +0200

aptosid-scripts (0.4.2) unstable; urgency=low

* add id tags for firmware captions.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Fri, 10 Sep 2010 21:59:31 +0200

aptosid-scripts (0.4.1) unstable; urgency=low

* add proper takeover support

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sun, 29 Aug 2010 04:29:29 +0200

aptosid-scripts (0.4.0) unstable; urgency=low

* rename to aptosid.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sun, 29 Aug 2010 04:24:33 +0200

sidux-scripts (0.3.12) unstable; urgency=low

* switch to compat level 8.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sun, 08 Aug 2010 05:22:40 +0200

sidux-scripts (0.3.11) unstable; urgency=low

* bump standards version to 3.9.1, no changes necessary.
* elaborate long description a bit further, to make lintian happy.
* make lintian happy about hyphen-used-as-minus-sign.
* fix syntax errors in fw-detect.1

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 04 Aug 2010 04:35:01 +0200

sidux-scripts (0.3.10) unstable; urgency=low

* update firmware db:
- Afatech AF9015 DVB-T
- Atheros AR9170 802.11n USB wireless
- Atheros AR9271 802.11n-lite USB wireless
- Realtek RTL8188S 150/ RTL8191S 300 MBit/s USB WiFi cards
- Realtek RTL8192E 150/ 300 MBit/s PCI WiFi cards

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 26 May 2010 18:55:46 +0200

sidux-scripts (0.3.9) unstable; urgency=low

[ Joaquim Boura ]
* changed default service zu dpaste

[ Stefan Lippers-Hollmann ]
* Switch to dpkg-source 3.0 (native) format.
* bump standards version to 3.8.4, no changes necessary.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 24 Mar 2010 00:30:11 +0100

sidux-scripts (0.3.8) unstable; urgency=low

[ Stefan Lippers-Hollmann ]
* fix firmware locations.

[ Joaquim Boura ]
* fixed URL for ESS Allegro

-- Joaquim Boura <x-un-i@berlios.de> Sat, 02 Jan 2010 13:05:43 +0100

sidux-scripts (0.3.7) unstable; urgency=low

* new upstream version from wgetpaste.
Some more paste services were added.

-- Joaquim Boura <x-un-i@berlios.de> Sun, 27 Dec 2009 12:22:28 +0100

sidux-scripts (0.3.6) unstable; urgency=low

* fw-data.ini:
- drop ACX100, it's broken for ages.
- add Afatech AF9015 DVB-T.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 11 Nov 2009 00:21:48 +0100

sidux-scripts (0.3.5) unstable; urgency=low

* update to firmware-linux-free vs. firmware-linux-nonfree.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 29 Oct 2009 22:26:40 +0100

sidux-scripts (0.3.4) unstable; urgency=low

[ Joaquim Boura ]
* it translation for the notes (thks alessiog75)
* el translation for the notes (thks edhunter)

[ Stefan Lippers-Hollmann ]
* fix Broadcom Blutonium description.

-- Joaquim Boura <x-un-i@berlios.de> Tue, 27 Oct 2009 17:43:57 +0100

sidux-scripts (0.3.3) unstable; urgency=low

[ Niall Walsh ]
* fw-detect:
- rewrite firmware_ok (thanks DonKult)
- more ini updates (thanks DonKult)
* fw-data-convert:
- fix quoting on FW_CARDS_FW_DEV_STR
- drop file field from output
- stop duplicating fw and url
* fw: use the right index to FW_CARDS_FW when not SHORT in sys_detect

[ Joaquim Boura ]
* do not run sys_detect on -h or unknown option

[ Stefan Lippers-Hollmann ]
* s/h3/strong/.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sat, 24 Oct 2009 22:34:18 +0200

sidux-scripts (0.3.2) unstable; urgency=low

* Add a basic manpage and -h option to fw-detect
* Fix typo of missing second _FW in FW_CARDS_FW_DEV_*

-- Niall Walsh <niallwalsh@users.berlios.de> Fri, 23 Oct 2009 19:19:22 +0100

sidux-scripts (0.3.1) unstable; urgency=low

[ Niall Walsh ]
* fw-data.ini
- Finish populating an initial set of the fw-data.ini class fields
- Remove "network adapters" from netXtremeII
- Add sample of note translation
- fix usb class, add some missing, ensure all are in another class
- change v4l to webcam
- get the word "support" out of titles

[ Stefan Lippers-Hollmann ]
* translate notes to german.
* add cs46xx.
* add cxgb3.
* add af9005.

-- Niall Walsh <niallwalsh@users.berlios.de> Wed, 21 Oct 2009 20:56:20 +0100

sidux-scripts (0.3.0) unstable; urgency=low

[ Niall Walsh ]
* Overhaul fw-detect.
- Split out most of the logic to /usr/share/sidux-scripts/fw
- Split out the data into /usr/share/sidux-scripts/fw-data
- Edit the data via an ini file in the source packaging
* Update data to 2009-02 Release notes

[ Stefan Lippers-Hollmann ]
* bump standards version to 3.8.3, no changes necessary.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Fri, 16 Oct 2009 23:16:54 +0200

sidux-scripts (0.2.27) unstable; urgency=low

* drop KDE3 compatibility, make dpi changes more robust.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 08 Jul 2009 21:21:58 +0200

sidux-scripts (0.2.26) unstable; urgency=low

[ Michael Deelwater ]
* Remove noforcespeed option. Does only cause problems.

[ Stefan Lippers-Hollmann ]
* bump standards version to 3.8.2, no changes necessary.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Mon, 29 Jun 2009 14:22:34 +0200

sidux-scripts (0.2.25) unstable; urgency=low

* bump standards version to 3.8.1, no changes necessary.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 28 May 2009 01:09:32 +0200

sidux-scripts (0.2.24) unstable; urgency=low

* new upstream version from wgetpaste.
Set default past service to pastbin.ca as rafb.net is dead.

-- Joaquim Boura <x-un-i@berlios.de> Wed, 27 May 2009 23:54:49 +0200

sidux-scripts (0.2.23) unstable; urgency=low

[ Joaquim Boura ]
* kdm has now his config in /etc/kde4

[ Stefan Lippers-Hollmann ]
* adapt fix-kdm-dpi for kde4, general overhaul.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Mon, 13 Apr 2009 13:44:44 +0200

sidux-scripts (0.2.22) unstable; urgency=low

* Add burniso script and manpage.
* Update debian/copyright for burniso.
* debian/manpages:
- Newly created for burniso.
* debian/control:
- Add wodim to Depends.
* Fix language in manpage. Thanks bluewater!

-- Michael Deelwater <michael.deelwater@googlemail.com> Tue, 17 Feb 2009 00:04:36 +0100

sidux-scripts (0.2.21) unstable; urgency=low

* added missing hints for firmware found in the kernel git tree

-- Joaquim Boura <x-un-i@berlios.de> Thu, 18 Dec 2008 21:01:36 +0100

sidux-scripts (0.2.20) unstable; urgency=low

* fix syntax of fw-detect.
* make lintian happy and depend on ${misc:Depends}.
* drop useless Conflicts with ancient configure-networkcard.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Mon, 08 Dec 2008 01:52:35 +0100

sidux-scripts (0.2.19) unstable; urgency=low

[ Stefan Lippers-Hollmann ]
* s/ipw2?00-firmware/firmware-ipw2x00/g for fwdetect.
* drop special handling for Atheros hardware, ath5k and ath9k handle all
devices previously covered by madwifi.
* add hints for:
- Korg 1212 IO audio device
- ESS Allegro Maestro3 audio device
- Yamaha YMF724/740/744/754 audio devices
- SMC ISA/MCA Token Ring adapter
- USB KLSI KL5USB101-based Ethernet device

[ Joaquim Boura ]
* add hints for:
- CPiA2 -- cameras based on Vision's CPiA2
- DABUSB -- Digital Audio Broadcasting (DAB) Receiver for USB and Linux
- USB TI 3410/5052 serial device
- EMI 2|6 USB Audio interface
- EMI 6|2m USB Audio interface
- USB Keyspan USA-xxx serial device
- USB Keyspan PDA single-port serial device
- Computone IntelliPort Plus serial device
- USB 3com HomeConnect (aka vicam)
- USB ConnectTech WhiteHEAT serial device

-- Joaquim Boura <x-un-i@berlios.de> Sun, 07 Dec 2008 19:03:09 +0100

sidux-scripts (0.2.18) unstable; urgency=low

* neither bcm43xx nor bcm43xx-fwcutter exist anymore.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sun, 16 Nov 2008 00:27:06 +0100

sidux-scripts (0.2.17) unstable; urgency=low

* fw-detect: add iwlagn

-- Kel Modderman <kel@otaku42.de> Tue, 14 Oct 2008 23:48:51 +1000

sidux-scripts (0.2.16) unstable; urgency=low

* fw-detect: do not bother detecting atheros hardware if ath5k|ath9k
is present, they will have claimed the device already.

-- Kel Modderman <kel@otaku42.de> Sat, 20 Sep 2008 07:24:44 +1000

sidux-scripts (0.2.15) unstable; urgency=low

* fw-detect:
- apply patch from ModestUser improving DVB related output
- remove dead code from atheros pci section
* Remove fix-5b-mouse, get-sidux-binary-gfx and sidux-apt-config; they
are unmaintained and buggy.

-- Kel Modderman <kel@otaku42.de> Fri, 04 Jul 2008 15:02:30 +1000

sidux-scripts (0.2.14) unstable; urgency=low

* sgxfi is infringing the GPL and proprietary vendor licenses, it has no
business in sidux.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Fri, 06 Jun 2008 10:28:15 +0200

sidux-scripts (0.2.13) unstable; urgency=low

[ Kel Modderman ]
* fw-detect:
- apply patch from ModestUser adding detection for various DVB firmware
- use /sys/modules/* and not the deeper /sys/bus/*/drivers/*
- fix ugly coding style of case constructs

[ Stefan Lippers-Hollmann ]
* bump standards version to 3.8.0, no changes necessary.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Fri, 06 Jun 2008 00:23:35 +0200

sidux-scripts (0.2.12) unstable; urgency=low

* switch to the new dh implementation of debhelper 7.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 07 May 2008 02:26:04 +0200

sidux-scripts (0.2.11) unstable; urgency=low

* wgetpaste uptaded to version 2.10

-- Joaquim Boura <x-un-i@berlios.de> Wed, 09 Apr 2008 13:53:01 +0200

sidux-scripts (0.2.10) unstable; urgency=low

* fw-detect: atheros install updated

-- Fabian Wuertz <xadras@users.berlios.de> Sun, 23 Mar 2008 22:37:56 +0100

sidux-scripts (0.2.9) unstable; urgency=low

* New upstream version (2.9). Script renamed to wgetpaste

-- Joaquim Boura <x-un-i@berlios.de> Tue, 11 Mar 2008 11:32:07 +0100

sidux-scripts (0.2.8) unstable; urgency=low

* appease lintian and write (C) as © in debian/copyright.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 21 Feb 2008 01:16:41 +0100

sidux-scripts (0.2.7) unstable; urgency=low

* inetconn updated

-- Horst Tritremmel <hjt@users.berlios.de> Wed, 06 Feb 2008 12:39:38 +0100

sidux-scripts (0.2.6) unstable; urgency=low

* SSFT_FRONTEND check in fw-detect disabled
* option y=installable drivers added
* debian/install fixed

-- Horst Tritremmel <hjt@users.berlios.de> Mon, 04 Feb 2008 22:07:31 +0100

sidux-scripts (0.2.5) unstable; urgency=low

* internet connect checkscript "inetconn" added

-- Horst Tritremmel <hjt@users.berlios.de> Thu, 31 Jan 2008 16:56:58 +0100

sidux-scripts (0.2.4) unstable; urgency=low

* s/echo/ssft/ in fw-detect

-- Horst Tritremmel <hjt@users.berlios.de> Tue, 29 Jan 2008 20:49:06 +0100

sidux-scripts (0.2.3) unstable; urgency=low

* Use full path to modinfo, it may not be in user $PATH.

-- Kel Modderman <kel@otaku42.de> Thu, 24 Jan 2008 10:37:54 +1000

sidux-scripts (0.2.2) unstable; urgency=low

* fw-detect modified for siduxcc

-- Fabian Wuertz <xadras@users.berlios.de> Tue, 22 Jan 2008 21:27:49 +0100

sidux-scripts (0.2.1) unstable; urgency=low

* update to debhelper compat 6.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sat, 19 Jan 2008 02:40:56 +0100

sidux-scripts (0.2.0) unstable; urgency=low

* ship fw-detect as part of sidux-scripts.
* add fw-detect to debian/copyright.
* clean up/ re- indent debian/copyright.
* remove bogus dependency on udev.
* remove dead masquerade script.
* switch from custom su-me to generic su-to-root, adapt dependencies and
menu files accordingly.
* general clean up.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 08 Jan 2008 13:53:34 +0100

sidux-scripts (0.1.45) unstable; urgency=low

* get-resume-partition: also hack /etc/uswsusp.conf if present, when
updating resume partition to use a UUID.

-- Kel Modderman <kel@otaku42.de> Mon, 07 Jan 2008 15:51:13 +1000

sidux-scripts (0.1.44) unstable; urgency=low

* tell the user about du-fixes-h2.sh and sm being replaced by smxi.
* enforce using smxi, after showing the warning.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 13 Dec 2007 00:24:03 +0100

sidux-scripts (0.1.43) unstable; urgency=low

* get-resume-partition: announce change at the end of script.
* Make message when no swap is on system less scary.

-- Kel Modderman <kel@otaku42.de> Fri, 07 Dec 2007 08:38:17 +1000

sidux-scripts (0.1.42) unstable; urgency=low

* Add svmi link to smxi.

-- Kel Modderman <kel@otaku42.de> Wed, 05 Dec 2007 09:28:29 +1000

sidux-scripts (0.1.41) unstable; urgency=low

* Prompt for password in get-resume-partition.

-- Kel Modderman <kel@otaku42.de> Tue, 04 Dec 2007 23:38:42 +1000


sidux-scripts (0.1.40) unstable; urgency=low

* remove fix-5b-mouse for the time being, as is it doesn't play well with
current X.org versions.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 04 Dec 2007 14:38:30 +0100

sidux-scripts (0.1.39) unstable; urgency=low

[ Stefan Lippers-Hollmann ]
* update to Standards-Version 3.7.3, no changes necessary.

[ Kel Modderman ]
* get-resume-partition: validate existing configuration before updating.

-- Kel Modderman <kel@otaku42.de> Tue, 04 Dec 2007 16:19:55 +1000

sidux-scripts (0.1.38) unstable; urgency=low

* set all shipped scripts executable.
* remove exec flags from dead scripts.
* don't ship masquerade any longer, hardcoded interface names and no
security just don't make any sense.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 29 Nov 2007 16:05:57 +0100

sidux-scripts (0.1.37) unstable; urgency=low

* nuke $DEBMM handling.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 20 Nov 2007 00:58:41 +0100

sidux-scripts (0.1.36) unstable; urgency=low

* import new smxi downloader stub from h2.
* add trap handling on user abort.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 01 Nov 2007 22:55:50 +0100

sidux-scripts (0.1.35) unstable; urgency=low

* import h2's new download stub.
* quote basename's output.
* fix dangerous tempfile handling.
* further quoting fixes.
* POSIX compatibility is a low hanging fruit, do it.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Fri, 26 Oct 2007 21:56:11 +0200

sidux-scripts (0.1.34) unstable; urgency=low

[ Stefan Lippers-Hollmann ]
* update syntax for Vcs headers in debian/control

[ Joaquim Boura ]
* new script sidux-paste using wgetpaste ( found in gentoo)
* fixed name + place

[ Kel Modderman ]
* Update get-resume-partition to something that works, see discussion:
http://sidux.com/PNphpBB2-viewtopic-t-5332.html

-- Kel Modderman <kel@otaku42.de> Tue, 23 Oct 2007 23:30:59 +1000

sidux-scripts (0.1.33) unstable; urgency=low

* add VCS control headers.
* remove old cruft:
- wep-key.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 18 Sep 2007 09:58:37 +0200

sidux-scripts (0.1.32) unstable; urgency=low

* get-sidux-binary-gfx enhanced. Autorun Option added.

-- Andreas Weber <andreas@it-weber.com> Wed, 22 Aug 2007 21:58:36 +0200

sidux-scripts (0.1.31) unstable; urgency=low

* get-sidux-binary-gfx user info fixed

-- webera <andreas@it-weber.com> Tue, 21 Aug 2007 22:06:31 +0200

sidux-scripts (0.1.30) unstable; urgency=low

* rename /usr/sbin/sm to /usr/sbin/smxi and do asssorted clean up.
* overhaul get-resume-partition:
- remove bogus perl dependency
- switch to UUIDs
- proper escaping
* drop bogus dependency on dh-make.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 19 Jul 2007 13:01:42 +0200

sidux-scripts (0.1.29) unstable; urgency=low

* remove bad options from wget. Thks Snubbelfot

-- Joaquim Boura <x-un-i@berlios.de> Wed, 27 Jun 2007 22:05:02 +0200

sidux-scripts (0.1.28) unstable; urgency=low

* new stub from h2 to reflect name change
* stub renamed to sm created links to sgfxi and du-fixes-h2.sh
* also needed to fix name change in the install file

-- Joaquim Boura <x-un-i@berlios.de> Mon, 25 Jun 2007 20:18:58 +0200

sidux-scripts (0.1.27) unstable; urgency=low

* remove obsolete scripts.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sun, 03 Jun 2007 16:07:35 +0200

sidux-scripts (0.1.26) unstable; urgency=low

* /var/run/kdm/kdmrc must also be changed otherwise user must go over init
3/init 5 wigwam

-- Joaquim Boura <x-un-i@berlios.de> Wed, 23 May 2007 22:48:31 +0200

sidux-scripts (0.1.25) unstable; urgency=low

[ Kel Modderman ]
* Update h2's du-fixes stub. It now identifies sgfxi as a "caller" and
downloads/executes sgfxi immediately.
* Add symlink /usr/sbin/sgfxi -> /usr/sbin/du-fixes-h2.sh to actiavte above
change.
* Update debian/copyright to reflect Harold Hope's and I influence.
* Add myself to Uploaders.

[ Stefan Lippers-Hollmann ]
* minor quotation fix.
* relative links rule.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 23 May 2007 15:30:55 +0200

sidux-scripts (0.1.24) unstable; urgency=low

* fix chmodding in du-fixes-h2.sh stub.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 22 May 2007 19:06:35 +0200

sidux-scripts (0.1.23) unstable; urgency=low

* import fixed du-fixes-h2.sh downloader stub.
* minor coding style changes.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Mon, 21 May 2007 23:27:30 +0200

sidux-scripts (0.1.22) unstable; urgency=low

[ Kel Modderman ]
* Initial import of du-fixes-h2 stub installer.
* Add su-me call to du-fixes-h2.
* fix-time should not call tzselect, because it is no-op. To really set the
timezone call dpkg-reconfigure tzdata.

[ Stefan Lippers-Hollmann ]
* rework du-fixes-h2.sh download/ exec stub.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sun, 20 May 2007 11:40:01 +0200

sidux-scripts (0.1.21) unstable; urgency=low

* remove fix-unionfs, we don't support the link farming anymore (fix
remaining packages not to use it).

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 24 Apr 2007 00:52:45 +0200

sidux-scripts (0.1.20) unstable; urgency=low

* tzselect finally replaces tzconfig, thanks to cheko for noticing.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Mon, 16 Apr 2007 18:39:09 +0200

sidux-scripts (0.1.19) unstable; urgency=low

[ Stefan Lippers-Hollmann ]
* kanotix-scripts was never part of sidux or debian, don't conflict with it.

[ Andreas Weber ]
* sidux-apt-config.pl added.
* Usage Printout added to sidux-apt-config.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 1 Mar 2007 19:10:57 +0100

sidux-scripts (0.1.18) unstable; urgency=low

* fix up fix-time to deal with the current ntpdate in sid and make it
actually do something useful.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Fri, 2 Feb 2007 01:42:58 +0100

sidux-scripts (0.1.17) unstable; urgency=low

* merge in new changes.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 24 Jan 2007 10:22:02 +0100

sidux-scripts (0.1.16) unstable; urgency=low

* install-sidux-binary-gfx renamed to get-sidux-binary-gfx
* su-me fixed and autstart of the Script disabled
* Comments added and repo changed to sidux.com

-- Andreas Weber <andreas@it-weber.com> Wed, 24 Jan 2007 18:51:58 +0100

sidux-scripts (0.1.15) unstable; urgency=low

* install-sidux-binary-gfx added. This will install the Sidux Package to
install the Nvidia / ATI Kernel Module.

-- Andreas Weber <andreas@it-weber.com> Tue, 16 Jan 2007 10:54:47 +0100

sidux-scripts (0.1.14) unstable; urgency=low

* fix defaults for sidux.
* fix bashism.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 2 Jan 2007 15:32:15 +0100

sidux-scripts (0.1.13) unstable; urgency=low

* remove install-chkrootkit-local install-f-prot-local, unionfs can do a
much better job these days.
* fix-xv-local is obsolete.
* use su-me where possible, use a canonical stanza for it.
* fix ntpserver defintions for fix-time.
* recommend ntpdate.
* use #!/bin/sh for all scripts.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sat, 30 Dec 2006 14:25:53 +0100

sidux-scripts (0.1.12) unstable; urgency=low

[ Joaquim Boura ]
* Initial version for sidux

[ Stefan Lippers-Hollmann ]
* remove obsolete devmap_mknod.
* remove obsolete make-qt-deb.
* tweak debian/control.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sun, 3 Dec 2006 02:53:37 +0100

kanotix-scripts (0.1.11) unstable; urgency=low

* white space clean up.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 16 Nov 2006 21:28:30 +0100

kanotix-scripts (0.1.10) unstable; urgency=low

* use pool.ntp.org for fix-time.
* fix bashisms.
* use kanotix-su.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Thu, 9 Nov 2006 21:10:13 +0100

kanotix-scripts (0.1.9) unstable; urgency=low

* switch to utf-8.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 1 Nov 2006 00:27:07 +0100

kanotix-scripts (0.1.8) unstable; urgency=low

[ Stefan Lippers-Hollmann ]
* XFree86 4.3 is obsolete.

[ Joerg Schirottke ]
* update fix-5b-mouse.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 1 Nov 2006 00:27:01 +0100

kanotix-scripts (0.1.7) unstable; urgency=low

* temporarily support XFree86 4.3 again.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Wed, 13 Sep 2006 02:23:49 +0200

kanotix-scripts (0.1.6) unstable; urgency=low

* XFree86 4.3 is obsolete.
* quote variables.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 29 Aug 2006 13:59:15 +0200

kanotix-scripts (0.1.5) unstable; urgency=low

* remove cdbs auto update feature.
* bump compat level to 5.
* bump standards version to 3.7.2.
* update fix-5b-mouse.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 29 Aug 2006 13:53:43 +0200

kanotix-scripts (0.1.4) unstable; urgency=low

* fix/ adapt fix-5b-mouse for X.org 6.9.0.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sat, 31 Dec 2005 13:36:42 +0100

kanotix-scripts (0.1.3) unstable; urgency=low

* move fix-udev-lan to kanotix-udev-config.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sun, 16 Oct 2005 23:54:07 +0200

kanotix-scripts (0.1.2) unstable; urgency=low

* add fix-udev-lan.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sat, 15 Oct 2005 23:41:44 +0200

kanotix-scripts (0.1.1) unstable; urgency=low

* add dh_make to dependencies.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Sat, 15 Oct 2005 13:49:23 +0200

kanotix-scripts (0.1) unstable; urgency=low

* Initial release.

-- Stefan Lippers-Hollmann <s.l-h@gmx.de> Tue, 23 Aug 2005 11:03:21 +0200


+ 1
- 0
debian/compat View File

@@ -0,0 +1 @@
8

+ 34
- 0
debian/control View File

@@ -0,0 +1,34 @@
Source: siduction-scripts
Section: misc
Priority: extra
Maintainer: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Ferdinand Thommes <devil@siduction.org>
Uploaders: Kel Modderman <kel@otaku42.de>,
Joaquim Boura <x-un-i@berlios.de>
Ferdinand Thommes <devil@siduction.org>
Build-Depends: debhelper (>= 8),
libconfig-tiny-perl
Standards-Version: 3.9.2
Vcs-Svn:
Vcs-Browser: http://git.siduction.org/?p=packages/siduction-repository/siduction-scripts.git;a=summary

Package: siduction-scripts
Architecture: all
Depends: ${misc:Depends},
perl,
distro-defaults,
wodim
Recommends: menu,
ntpdate
Description: miscellaneous scripts for siduction
Script collection for live and install uses on siduction:
* burniso (write an ISO image from cli)
* fix-dpi-kdm (tweak dpi settings for kdm/ KDE)
* fix-ssh (generate ssh host keys, which are missing on the live system)
* fix-time (configure timezone and sync time via ntp)
* fw-detect (identify missing firmware for installed hardware)
* get-resume-partition (configure a resume (swap) partition based on UUIDs)
* inetconn (check if an internet connection is active)
* remove-gateway (remove configured gateways from /etc/network/interfaces)
* remove-orphans (purge files which were merely removed)
* siduction-paste/ wgetpaste (paste cli output to a pastebin)

+ 26
- 0
debian/copyright View File

@@ -0,0 +1,26 @@
This package was debianized by Stefan Lippers-Hollmann <s.l-h@gmx.de> on
Tue, 23 Aug 2005 11:03:21 +0200.

The latest copy of source code for this package can always be found at:
http://aptosid.com/debian/pool/main/s/aptosid-scripts/

Copyright Holders:
Copyright © 2003-2006 Jörg Schirottke <master@kanotix.com>
Copyright © 2004-2008 Stefan Lippers-Hollmann <s.l-h@gmx.de>
Copyright © 2005-2008 Kel Modderman <kel@otaku42.de>
Copyright © 2005-2007 Harald Hope
Copyright © 2011 Ferdinand Thommes <devil@siduction.org>

wgetpaste is
Copyright © 2007 Bo Ørsted Andresen <bo.andresen@zlin.dk>
Distributed as-is. With no warranties.

fw-detect:
© 2006-2008 Kel Modderman <kel@otaku42.de>
© 2009 Niall Walsh <niallwalsh@users.berlios.de>

burniso, burniso.1:
Copyright 2009, Michael Deelwater
<michael.deelwater@googlemail.com>

License: GPL, see /usr/share/common-licenses/GPL-2

+ 13
- 0
debian/install View File

@@ -0,0 +1,13 @@
burniso usr/bin/
fix-dpi-kdm usr/sbin/
fix-ssh usr/sbin/
fix-time usr/sbin/
fw usr/share/siduction-scripts/
fw-data.sh usr/share/siduction-scripts/
fw-detect usr/bin/
get-resume-partition usr/sbin/
inetconn usr/bin/
remove-gateway usr/sbin/
remove-orphans usr/sbin/
siduction-paste usr/bin/
wgetpaste usr/bin/

+ 2
- 0
debian/manpages View File

@@ -0,0 +1,2 @@
burniso.1
fw-detect.1

+ 4
- 0
debian/rules View File

@@ -0,0 +1,4 @@
#!/usr/bin/make -f

%:
dh $@

+ 1
- 0
debian/source/format View File

@@ -0,0 +1 @@
3.0 (native)

+ 26
- 0
fix-dpi-kdm View File

@@ -0,0 +1,26 @@
#!/bin/sh

if [ "$(id -u)" -ne 0 ]; then
[ -x "$(which su-to-root)" ] && exec su-to-root -X -c "$0" "$@"
printf "ERROR: $(basename ${0}) needs root capabilities, please start it as root.\n\n" >&2
exit 1
fi

DPI=100
[ "${1}" ] && DPI="${1}"

if [ ${DPI} -eq ${DPI} ] && [ -w /etc/kde4/kdm/kdmrc ]; then

sed -i -e "s/\(^ServerArgsLocal\=.*\)\ \-dpi[ \t]*[0-9]*\(.*$\)/\1\2/" \
-e "s/\(^ServerArgsLocal\=.*\)\-dpi[ \t]*[0-9]*\(.*$\)/\1\2/" \
-e "s/\(^ServerArgsLocal\=.*\) *$/\1/" \
-e "s/^ServerArgsLocal\=.*$/& \-dpi ${DPI}/" \
/etc/kde4/kdm/kdmrc

printf "KDM setting was changed to $DPI. You can use another value like:\n"
printf "$(basename ${0}) 75\n"
printf "Now restart kdm (/etc/init.d/kdm restart)\n\n"
else
echo "ERROR: parameter ${DPI} not a number." >&2
echo "Usage: $(basename ${0}) [dpi]" >&2
fi

+ 11
- 0
fix-ssh View File

@@ -0,0 +1,11 @@
#!/bin/sh

if [ "$(id -u)" -ne 0 ]; then
[ -x "$(which su-to-root)" ] && exec su-to-root -X -c "$0" "$@"
printf "ERROR: $0 needs root capabilities, please start it as root.\n\n" >&2
exit 1
fi

[ -e /etc/ssh/ssh_host_rsa_key ] || ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C '' -N ''
[ -e /etc/ssh/ssh_host_dsa_key ] || ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -C '' -N ''


+ 26
- 0
fix-time View File

@@ -0,0 +1,26 @@
#!/bin/sh

if [ "$(id -u)" -ne 0 ]; then
[ -x "$(which su-to-root)" ] && exec su-to-root -X -c "$0" "$@"
printf "ERROR: $0 needs root capabilities, please start it as root.\n\n" >&2
exit 1
fi

# get time servers from /etc/default/ntpdate
. /etc/default/ntpdate
[ -z "$NTPSERVER" ] && NTPSERVER="pool.ntp.org"

# assume the hw clock being in local time
hwclock --hctosys --localtime

# let the user set their time zone
dpkg-reconfigure tzdata

# sync with time servers
for i in $NTPSERVER; do
if ntpdate -u -b "$i"; then
hwclock --systohc
break
fi
done


+ 376
- 0
fw View File

@@ -0,0 +1,376 @@
#!/bin/bash
#
# Copyright 2009 Niall Walsh <niallwalsh@users.berlios.de>
# Derived from prior aptosid-scripts/fw-detect which is
# Copyright 2007 Kel Modderman <kel@otaku42.de>
# License: GPLv2
#
# Provides functions for firmware data related actions
#


. /usr/share/siduction-scripts/fw-data.sh

function driver_firmware() {
local dnum=0
local test_driver
local driver="${1}"
for test_driver in ${FW_CARDS_FW_DEV_STR[@]} ; do
case "${driver}" in
${test_driver})
echo ${FW_CARDS_FW_DEV_NUM[${dnum}]}
return
;;
esac
dnum=$((${dnum}+1))
done
}

function firmware_needed() {
local required=$(driver_firmware ${1})
[ -n "${required}" ] && \
echo "${FW_CARDS_FW[${required}]}"
}

function show_all_cards() {
echo ${FW_CARDS[@]}
}

function show_all_detail() {
i=0
for card in ${FW_CARDS[@]} ; do
echo "${FW_CARDS[$i]}"
[ -n "${FW_CARDS_FW[$i]}" ] && echo " ${FW_CARDS_FW[$i]}"
[ -n "${FW_CARDS_FW_URL[$i]}" ] && echo " url ${FW_CARDS_FW_URL[$i]}"
[ -n "${FW_CARDS_FW_FILE[$i]}" ] && echo " file ${FW_CARDS_FW_FILE[$i]}"
[ -n "${FW_CARDS_FW_OK[$i]}" ] && echo " test ${FW_CARDS_FW_OK[$i]}"
local patterns=0
local pnum=0
local num
for num in ${FW_CARDS_FW_DEV_NUM[@]} ; do
if [ "${num}" = "$i" ] ; then
if [ $patterns -eq 0 ]; then
patterns=1
echo -n " drivers "
else
echo -n " "
fi
echo -n "${FW_CARDS_FW_DEV_STR[$pnum]}"
fi
pnum=$((pnum+1))
done
if [ $patterns -gt 0 ] ; then
echo ""
fi
i=$((i+1))
done
}

function show_ini() {
i=0
for card in ${FW_CARDS[@]} ; do
echo "[${FW_CARDS[$i]}]"
[ -n "${FW_CARDS_FW[$i]}" ] && echo "fw=\"${FW_CARDS_FW[$i]}\""
[ -n "${FW_CARDS_FW_URL[$i]}" ] && echo "url=\"${FW_CARDS_FW_URL[$i]}\""
[ -n "${FW_CARDS_FW_FILE[$i]}" ] && echo "file=\"${FW_CARDS_FW_FILE[$i]}\""
[ -n "${FW_CARDS_FW_OK[$i]}" ] && echo "ok=\"${FW_CARDS_FW_OK[$i]}\""
local patterns=0
local pnum=0
local num
for num in ${FW_CARDS_FW_DEV_NUM[@]} ; do
if [ "${num}" = "$i" ] ; then
if [ $patterns -eq 0 ]; then
patterns=1
echo -n 'drivers="'
else
echo -n ' '
fi
echo -n "${FW_CARDS_FW_DEV_STR[$pnum]}"
fi
pnum=$((pnum+1))
done
if [ $patterns -gt 0 ] ; then
echo '"'
fi
echo ""
i=$((i+1))
done
}

function display_message() {
# we need gettext (is loaded in ssft.sh or cloned...)
if [ -f /usr/bin/gettext.sh ]; then
. /usr/bin/gettext.sh || exit 1
else
exit 1
fi

export TEXTDOMAIN="fw-detect"
export TEXTDOMAINDIR=/usr/share/locale

# determine system status
SSFTSH="$(which ssft.sh)" || SSFTSH="/usr/bin/ssft.sh"
# initialize ssft
. "$SSFTSH"

# --- If you want another frontend, do "export SSFT_FRONTEND=$(ssft_choose_frontend)"
# before starting fw-detect
case "$1" in

# ------------------------------------------------------------------
apt-get)
local firmware="$(driver_firmware ${driver})"
ssft_display_message \
"$(gettext "Detected driver that requires firmware to operate")" \
"$(gettext "\
#
# Follow these instructions to obtain the correct firmware
# and activate the ${driver} driver:

apt-get update
${FW_CARDS_FW[${firmware}]}
modprobe -r ${driver}
modprobe ${driver}

You must first configure apt to install this non-free software,
refer to the offline manual that came with this distribution.
")"
;;

# ------------------------------------------------------------------
http)
local firmware="$(driver_firmware ${driver})"
if [[ ${fw_url} ]]; then
FW_URL=$(gettext "\
#
# You can obtain the firmware for ${driver} directly from:
# ${FW_CARDS_FW_URL[${firmware}]}
#
# Download the archive and uncompress it.
# Copy the contents to:
# /lib/firmware/")
fi

ssft_display_message \
"$(gettext "Detected driver that requires firmware to operate")" \
"$(gettext "\
#
# There is no readily available firmware package for ${driver}
# Visit the following page for information on how to obtain and
# install the required firmware:
# ${FW_CARDS_FW[${firmware}]}
${FW_URL}
#
# Once the firmware files have been installed, the ${driver}
# must be reloaded to activate the hardware.
# Use the following commands:
#
modprobe -r ${driver}
modprobe ${driver}")"
;;

# ------------------------------------------------------------------
dvb)
local firmware="$(driver_firmware ${driver})"
if ! ((DVB)); then
dvb_message="$(gettext "\
# The get_dvb_firmware script is required to install DVB related firmware.
# <http://www.kernel.org/doc/Documentation/dvb/get_dvb_firmware>
# Download it, copy it to /usr/local/bin and make it executable.
#")"
fi
ssft_display_message \
"$(gettext "Detected driver that requires firmware to operate")" \
"$(gettext "\
$dvb_message
# Follow these instructions to obtain the correct firmware
# and activate the ${driver} driver:
#")
cd /tmp
${FW_CARDS_FW[${firmware}]}
mv ${FW_CARDS_FW_FILE[${firmware}]} /lib/firmware"
;;

esac
}

function install_driver() {

# root check
if ((UID)); then
echo "Error: You must be root to run this script!"
exit 1
fi

# driver
driver=$@

echo $driver
fw=""
fw_url=""
fw_file=""
for name in ${FW_CARDS_FW_DEV_STR[@]}; do
case "${driver}" in
${name})
num=${FW_CARDS_FW_DEV_NUM[$num]}
fw=${FW_CARDS_FW[$num]}
fw_url=${FW_CARDS_FW_URL[$num]}
fw_file=${FW_CARDS_FW_FILE[$num]}
;;
esac
[ -n "${fw}${fw_url}${fw_file}" ] && break
done

case "${fw}" in
apt-get*)
apt-get update
${fw}
modprobe -r ${driver}
modprobe ${driver}
;;
http*)
display_message http
;;
get_dvb_firmware*)
if ((DVB)); then
TDIR="$(mktemp -d)"
pushd "$TDIR"
${fw}
mv "${fw_file}" /lib/firmware
popd
rm -fr "$TDIR"
else
display_message dvb
fi
;;
esac

exit
}

function say() {
[[ ${verbosity} ]] && echo ${@}
}

function kmodule_ok() {
local kmod="$(/sbin/modinfo -n ${1} 2>/dev/null)"

if [[ -f ${kmod} ]]; then
say "Kernel module: ${kmod}"
return 0
fi

return 1
}

function firmware_ok() {
while [ -n "$1" ]; do
local fwok="$1"
local fw_dir="${fwok%% *}"

# if the first part doesn't include a /, we operate in the default dir
if [ -z "${fw_dir}" ] || ! echo "${fw_dir}" | grep '/' &> /dev/null; then
fw_dir="/lib/firmware"
else
if [ "${fwok%% *}" = "${fwok##* }" ]; then
fwok=""
else
fwok="${fwok#* }"
fi
fi
if [ -d "${fw_dir}" ]; then
say "Firmware dir found: ${fw_dir}"
# check now if each named file exists in this dir
while [ -n "${fwok}" ]; do
local fw="${fwok%% *}"
if [ -e "${fw_dir}/${fw}" ]; then
say "Firmware found: ${fw_dir}/${fw}"
else
say "Firmware NOT found: ${fw_dir}/${fw}"
return 1
fi

# was this the last filename to check?
if [ "${fwok%% *}" = "${fwok##* }" ]; then
fwok=""
else
fwok="${fwok#* }"
fi
done
else
say "Firmware dir NOT found: ${fw_dir}"
return 1
fi

shift
done
say "Firmware is okay"
return 0
}

function sys_detect() {
#
# check modules have required firmware
#
say "Looking for common drivers that need firmware..."
for driver in /sys/module/*; do
[ -d "${driver}" ] || continue
driver=${driver#/sys/module/}
unset fw fw_url
pnum=0
firmware=""
for pat in ${FW_CARDS_FW_DEV_STR[@]} ; do
case "${driver}" in
$pat)
say "Driver: ${driver}"
firmware="$(driver_firmware ${driver})"
;;
esac
[ -n "${firmware}" ] && break
done
if [ -n "$firmware" ]; then
firmware_ok "${FW_CARDS_FW_OK[$firmware]}" && continue
if [ "$short" = "TRUE" ]; then
if [ -n "${FW_CARDS_FW[$firmware]}" ]; then
if [ "$install_possible" = "TRUE" ]; then
case "${FW_CARDS_FW[$firmware]}" in
apt-get*)
echo $driver
;;
get_dvb_firmware*)
((DVB)) && echo $driver
;;
esac
else
echo $driver
fi
fi
else
case "${FW_CARDS_FW[$firmware]}" in
apt-get*)
display_message apt-get
;;
http*)
display_message http
;;
get_dvb_firmware*)
display_message dvb
;;
esac
fi
pnum=$((pnum+1))
fi
done
}

function driver_check() {
for f in ${@} ; do
r=$(firmware_needed ${f})
[ -n "${r}" ] && echo "${f} requires firmware: ${r}"
done
}


+ 61
- 0
fw-data-convert View File

@@ -0,0 +1,61 @@
#!/usr/bin/perl
#
# Copyright 2009 Niall Walsh <niallwalsh@users.berlios.de>
# License: GPLv2
#
# Script to convert fw-data.ini file to shella
#

use strict;
my $file=$1;
if (length($file)==0)
{
$file='fw-data.ini';
}
unless (-f $file)
{
die "you must supply a valid filename to load from if fw-data.ini is not in the working directory";
}
# Using Config::Any instead would allow to switch to anything it supports
#use Config::Any;
#my $cfg = Config::Any->load_files({files => [ $file ] });
#my $cards = $$cfg[0]{$file};
use Config::Tiny;
my $cards = Config::Tiny->read($file);
my $name;
my $num=0;
my (@names, @fw, @url, @file, @dev, @map, @ok);
foreach $name (sort(keys(%$cards)))
{
push(@names,$name);
my $props = $$cards{$name};
my $field;
# can't use string as ref with strict so map name to array
my %fmap = ('fw'=>\@fw, 'url'=>\@url, 'ok'=> \@ok);
foreach $field ('fw','url','ok')
{
my $a = $fmap{$field};
if (length($$props{$field}))
{
push(@$a,"$$props{$field}");
}
else
{
push(@$a,'""');
}
}
my $prop;
my $drivers=$$props{'drivers'};
$drivers=~s/^\s*\"(.*)\"\s*$/$1/;
foreach $prop (split(/\s+/,$drivers))
{
push(@dev,'"'.$prop.'"');
push(@map,@names-1);
}
}
print 'FW_CARDS=( "'.join('" "',@names).'")'."\n";
print 'FW_CARDS_FW=( '.join(' ',@fw).')'."\n";
print 'FW_CARDS_FW_URL=( '.join(' ',@url).')'."\n";
print 'FW_CARDS_FW_OK=( '.join(' ',@ok).')'."\n";
print 'FW_CARDS_FW_DEV_STR=( '.join(' ',@dev).')'."\n";
print 'FW_CARDS_FW_DEV_NUM=( '.join(' ',@map).')'."\n";

+ 473
- 0
fw-data.ini View File

@@ -0,0 +1,473 @@
[af9005]
title="Afatech AF9005 DVB-T USB1.1"
ok="AF05BDA.sys"
drivers="dvb-usb-af9005"
class="tv usb"

[af9015]
fw="http://palosaari.fi/linux/v4l-dvb/firmware/af9015/5.1.0.0/dvb-usb-af9015.fw"
title="Afatech AF9015 DVB-T"
ok="dvb-usb-af9015.fw"
drivers="dvb-usb-af9015"
class="tv usb"

[ath3k]
fw="apt-get install firmware-atheros"
title="Atheros AR30xx Bluetooth chipset"
ok="ath3k-1.fw"
drivers="ath3k"
class="bluetooth"

[ar9170usb]
fw="http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/ar9170.fw"
title="Atheros AR9170 802.11n USB wireless"
ok="ar9170.fw"
drivers="ar9170usb"
class="ieee802.11 usb"

[ath9k_htc]
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=ar9271.fw;hb=HEAD"
title="Atheros AR7010/ AR9271 802.11n USB wireless"
ok="ar9271.fw ar7010.fw ar7010_1_1.fw"
drivers="ath9k_htc"
class="ieee802.11 usb"

[ati]
fw="apt-get install firmware-linux-nonfree"
drivers="radeon"
class="vga"
title="ATi r128 and Radeon r100-r780"

[atmel]
fw="apt-get install atmel-firmware"
ok="atmel_at76c5"
drivers="atmel* at76_usb"
class="ieee802.11 usb"
title="Atmel AT76c50x 11 MBit/s"

[av7110]
title="av7110 dvb"
fw="get_dvb_firmware av7110"
ok="dvb-ttpci-01.fw"
drivers="av7110"
class="tv"

[b43]
fw="apt-get install firmware-b43-lpphy-installer"
ok="/lib/firmware/b43 b0g0bsinitvals5.fw b0g0initvals5.fw ucode5.fw"
drivers="b43"
class="ieee802.11"
note="While this shouldn't be required for most 802.11b/g wlan cards anymore, the proprietary firmware gets preferred by b43, in case it is installed."
note_de="Während dies für die meisten 802.11b/g wlan Karten nicht mehr erforderlich sein sollte, wird die proprietäre Firmware, sofern installiert, von b43 bevorzugt."
note_it="Questo non dovrebbe più essere richiesto per la maggior parte delle schede wlan 802.11b/g, ma il firmware proprietario è quello scelto da b43 nel caso sia installato."
note_el="Αν και αυτό δεν χρειάζεται πλέον για τις περισσότερες 802.11b/g wlan κάρτες, η b43 προτιμάει το κλειστού κώδικα firmware σε περίπτωση που είναι εγκατεστημένο."
title="Broadcom b43"

[b43legacy]
fw="apt-get install firmware-b43legacy-installer"
ok="/lib/firmware/b43legacy ucode2.fw ucode4.fw pcm4.fw a0g0bsinitvals2.fw a0g0initvals2.fw b0g0bsinitvals2.fw b0g0initvals2.fw"
drivers="b43legacy"
class="ieee802.11"
title="Broadcom b43legacy"

[bcm2033]
fw="apt-get install bluez-firmware"
title="Broadcom Blutonium Bluetooth chipset (BCM203x)"
drivers="bcm203x"
class="bluetooth"

[bluebird]
title="bluebird dvb"
fw="get_dvb_firmware bluebird"
ok="dvb-usb-bluebird-01.fw"
drivers="bluebird"
class="tv usb"

[bnx2]
title="Broadcom NetXtremeII (BCM5706/5708/5709/5716, bnx)"
drivers="bnx2"
class="eth"
fw="apt-get install firmware-bnx2"

[bnx2x]
title="Broadcom NetXtremeII 10Gb (BCM57710/57711/57711E, bnx2x)"
drivers="bnx2x"
class="eth"
fw="apt-get install firmware-bnx2x"

[brcm80211]
fw="apt-get install firmware-brcm80211"
ok="/lib/firmware/brcm bcm43xx-0.fw bcm43xx_hdr-0.fw"
drivers="b43legacy"
class="ieee802.11"
title="Broadcom b43legacy"

[tg3]
title="Broadcom Tigon3 (tg3)"
class="eth"
drivers="tg3"
ok="/lib/firmware/tigon tg3.bin tg3_tso5.bin tg3_tso.bin"
fw="apt-get install firmware-linux-nonfree"

[cpia2]
title="cameras based on Vision's CPiA2"
class="video"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=cpia2;hb=HEAD /lib/firmware/cpia2/"
ok="/lib/firmware/cpia2 stv0672_vp4.bin"
drivers="cpia2"

[computone]
title="Computone IntelliPort Plus"
class="serial"
drivers="computone"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=intelliport2.bin;hb=HEAD"

[cs42xx]
title="Cirrus Logic (Sound Fusion) CS4280/CS461x/CS462x/CS463x"
class="audio"
note="follow the howto described in the bugreport carefully, MD5: 6510e1759d85b0627d36367febbb3a6a"
note_de="die Beschreibung im Bugreport ist exakt zu befolgen, MD5: 6510e1759d85b0627d36367febbb3a6a"
note_it="seguire l'howto descritto nel rapporto bug attentamente, MD5: 6510e1759d85b0627d36367febbb3a6a"
note_el="ακολουθείστε προσεκτικά τον οδηγό που βρίσκεται στην αναφορά σφάλματος (bugreport), MD5: 6510e1759d85b0627d36367febbb3a6a"
fw="http://bugs.debian.org/464197"
ok="/lib/firmware/cs46xx cs46xx-old.fw"
drivers="snd-cs46xx"

[cxgb3]
title="Chelsio Communications T3 10Gb Ethernet"
class="eth"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=cxgb3 /lib/firmware/cxgb3/"
ok="/lib/firmware/cxgb3 *.bin"
drivers="cxgb3"

[dabusb]
title="Digital Audio Broadcasting (DAB) Receiver"
fw="apt-get install firmware-linux-nonfree"
ok="/lib/firmware/dabusb bitstream.bin firmware.fw"
drivers="dabusb"
class="radio usb"

[dec2000t]
title="dec2000t dvb"
fw="get_dvb_firmware dec2000t"
ok="dvb-ttusb-dec-dec2000t.fw"
drivers="dec2000t"
class="tv usb"

[dec2500t]
title="dec2500t dvb"
fw="get_dvb_firmware dec2500t"
ok="dvb-ttusb-dec-dec20500t.fw"
drivers="dec2500t"
class="tv usb"

[dec3000t]
title="dec3000t dvb"
fw="get_dvb_firmware dec3000t"
ok="dvb-ttusb-dec-dec3000t.fw"
drivers="dec3000t"
class="tv usb"

[diusb]
title="diusb dvb"
fw="get_dvb_firmware diusb"
ok="dvb-diusb-5.0.0.11.fw"
drivers="diusb"
class="tv usb"

[dsp56k]
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=dsp56k;hb=HEAD /lib/firmware/dsp56k"
title="Atari DSP56k"
drivers="dsp56k"
class="modem"

[dvb]
title="various full featured DVB"
fw="http://www.linuxtv.org/downloads/firmware/"
drivers="dvb"
class="tv"
note="most budget cards won't need this"
note_de="die meisten budget Karten brauchen dies nicht"
note_it="la maggior parte delle schede economiche non ne hanno bisogno"
note_el="οι περισσότερες σχετικά φτηνές κάρτες (budget) δεν το χρειάζονται αυτό."

[eagle]
title="Eagle ADSL"
class="modem usb"
drivers="eagle"
fw="http://eagle-usb.org/ueagle-atm/non-free/"

[e100]
title="Intel e100 (82559 D101M/ D101M, 82551-F, 82551-10), 100 MBit/s"
fw="apt-get install firmware-linux-nonfree"
drivers="e100"
class="eth"

[edgeport]
title="Inside Out Edgeport"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=edgeport;hb=HEAD /lib/firmware/edgeport/"
drivers="edgeport"
class="serial usb"

[emi26]
title="EMI 2|6"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=emi26;hb=HEAD /lib/firmware/emi26/"
ok="/lib/firmware/emi26 bitstream.bin firmware.fw loader.fw"
drivers="emi26"
class="audio usb"

[emi62]
title="EMI 6|2m"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=emi62;hb=HEAD /lib/firmware/emi62"
ok="/lib/firmware/emi62 bitstream.bin loader.fw midi.fw spdif.fw"
drivers="emi62"
class="audio usb"

[intel]
title="Intel"
fw="apt-get install intel-microcode"
drivers=""
class="cpu"

[ipw2100]
title="Intel ipw2100 (11 MBit/s) and Intel ipw2200 (54 MBit/s)"
fw="apt-get install firmware-ipw2x00"
ok="ipw2100"
drivers="ipw2100 ipw2200"
class="ieee802.11"

[ivtv]
title="IVTV"
fw="http://dl.ivtvdriver.org/ivtv/firmware/"
drivers=""
class="tv"

[iwl]
title="Intel ipw3945/ iwlwifi, 54 Mbit/s and Intel ipw4965, iwl1000/ iwl5xxx, iwl6000, iwl6050/ iwlagn, draft-n"
fw="apt-get install firmware-iwlwifi"
ok="iwlwifi-3945-1.ucode iwlwifi-3945-2.ucode iwlwifi-4965-1.ucode iwlwifi-4965-2.ucode iwlwifi-5000-1.ucode iwlwifi-5000-2.ucode iwlwifi-5150-2.ucode"
drivers="iwl4965 iwl3945 iwlwifi-* iwlagn"
class="ieee802.11"

; [kaweth]
; fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=HEAD"
; ok="/lib/firmware/kaweth new_code.bin new_code_fix.bin trigger_code.bin trigger_code_fx.bin"
; drivers="kaweth"

[keyspan]
title="Keyspan USA-xxx"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=keyspan;hb=HEAD /lib/firmware/keyspan"
ok="/lib/firmware/keyspan mpr.fw usa18x.fw usa19.fw usq19qi.fw usa19qw.fw usa19w.fw usa28.fw usa28x.fw usa28xa.fw usa28xb.fw usa49w.fw usa19qw.fw usa49wlc.fw"
drivers="keyspan"
class="serial usb"

[keyspanpda]
title="Keyspan PDA single-port"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=keyspan_pda;hb=HEAD /lib/firmware/keyspan_pda"
drivers="keyspanda"
class="serial usb"

[klsi]
title="KLSI KL5USB101-based"
fw="apt-get install firmware-linux-nonfree"
drivers="klsi"
class="eth usb"

[matrox]
title="Matrox MGA 100-450"
fw="apt-get install firmware-linux-nonfree"
drivers="matrox"
class="vga"

[nova]
title="Technotrend/Hauppauge Nova"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=ttusb-budget;hb=HEAD /lib/firmware/ttusb-budget/"
drivers="nova"
class="tv usb"

[nvidia]
title="nVidia"
note="3d acceleration isn't possible with free drivers yet"
note_de="3D-Beschleunigung funktioniert mit freien Treibern noch nicht"
note_it="l'accelerazione 3D non è ancora possibile con i driver liberi"
note_el="η 3d επιτάχυνση δεν είναι εφικτή ακόμη με ανοικτού κώδικα οδηγούς"
drivers="nv"
class="vga"

[or51211]
title="or51211 dvb"
fw="get_dvb_firmware or51211"
ok="dvb-fe-or51211.fw"
drivers="or51211"
class="tv"

[or51132_qam]
title="or51132_qam"
fw="get_dvb_firmware or51132_qam"
ok="dvb-fe-or51132_qam.fw"
drivers="or51132_qam"
class="tv usb"

[or51132_vsb]
title="or51132_vsb dvb"
fw="get_dvb_firmware or51132_vsb"
ok="dvb-fe-or51132_vsb.fw"
drivers="or51132_vsb"
class="tv"

[p54pci]
title="Intersil prism54 (p54pci/ p54usb), 54 MBit/s"
fw="http://jbnote.free.fr/prism54usb/"
drivers="p54pci p54usb prism54"
class="ieee802.11 usb"

[r8169]
title="Realtek RTL8111D(L), 1 GBit/s ethernet"
drivers="r8169"
fw="apt-get install firmware-realtek"
ok="/lib/firmware/rtl_nic rtl8168d-1.fw rtl8168d-2.fw"
class="eth"

[ralink]
fw="apt-get install firmware-ralink"
ok="rt2561"
drivers="rt61*"
class="ieee802.11"

[ralink]
title="RaLink rt61, rt73, rt2860 and rt2870 54 MBit/s"
fw="apt-get install firmware-ralink"
ok="rt73"
drivers="rt73* rt61* rt28*"
class="ieee802.11"

[r8712u]
title="Realtek RTL8188S 150/ RTL8191S/ RTL8192S 300 MBit/s USB WiFi cards"
fw="apt-get install firmware-realtek"
ok="/lib/firmware/rtlwifi rtl8712u.bin"
drivers="r8712u"
class="ieee802.11 usb"

[rtl8192su]
title="Realtek RTL8188S 150/ RTL8191S 300 MBit/s USB WiFi cards"
fw="apt-get install firmware-realtek"
ok="/lib/firmware/RTL8192SU rtl8192sfw.bin"
drivers="r8192s_usb"
class="ieee802.11 usb"

[rtl8192e]
title="Realtek RTL8192E 150/ 300 MBit/s PCI WiFi cards"
fw="apt-get install firmware-realtek"
ok="/lib/firmware/RTL8192E data.img main.img boot.img"
drivers="r8192e_pci"
class="ieee802.11"

[rtl8192ce]
title="Realtek 8192C/8188C 150/ 300 MBit/s PCI WiFi cards"
fw="apt-get install firmware-realtek"
ok="/lib/firmware/rtlwifi rtl8192cfw.bin"
drivers="rtl8192ce"
class="ieee802.11"

[rtl8192se]
title="Realtek 8192S/8191S 150/ 300 MBit/s PCI WiFi cards"
fw="apt-get install firmware-realtek"
ok="/lib/firmware/rtlwifi rtl8192sefw.bin"
drivers="rtl8192se"
class="ieee802.11"

[sb16]
title="Sound Blaster 16/AWE CSP"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=sb16;hb=HEAD /lib/firmware/sb16"
drivers="sb16"
class="audio"

[smctr]
title="SMC ISA/MCA Token Ring"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=tr_smctr.bin;hb=HEAD"
ok="/lib/firmware/smctr tr_smctr.bin"
drivers="smctr"
class="eth"

[snd-korg1212]
title="Korg 1212 IO"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=korg;hb=HEAD /lib/firmware/korg"
ok="/lib/firmware/smctr k1212.dsp"
drivers="snd-korg1212"
class="audio"

[snd-maestro3]
title="ESS Allegro Maestro3"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=ess;hb=HEAD /lib/firmware/ess"
ok="/lib/firmware/ess maestro3_assp_kernel.fw maestro3_assp_minisrc.fw"
drivers="snd-maestro3"
class="audio"

[snd-ymfpci]
title="Yamaha YMF724/740/744/754"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=yamaha;hb=HEAD /lib/firmware/yamaha"
ok="/lib/firmware/yamaha ds1_ctrl.fw ds1_dsp.fw ds1e_ctrl.fw"
drivers="snd-ymfpci"
class="audio"

[sp8870]
title="sp8870 dvb"
fw="get_dvb_firmware sp8870"
ok="dvb-fe-sp8870"
drivers="sp8870"
class="tv"

[sp887x]
title="sp887x dvb"
fw="get_dvb_firmware sp887x"
ok="dvb-fe-sp887x"
drivers="sp887x"
class="tv"

[sun]
title="SUN Cassini GBit/s"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=sun;hb=HEAD /lib/firmware/sun"
drivers="sun"
class="eth"

[tda1004x]
title="tda1004x dvb"
fw="get_dvb_firmware tda10046"
ok="dvb-fe-tda10046.fw"
drivers="tda1004x"
class="tv"

[ti_usb]
title="TI 3410/5052"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=ti_3410.fw;hb=HEAD http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob;f=ti_5052.fw;hb=HEAD"
ok="/lib/firmware/ti_usb_3410_5052 ti_3410.fw ti_5052.fw"
drivers="ti_usb_3410_5052"
class="serial usb"

[vicam]
title="3com HomeConnect (aka vicam)"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=tree;f=vicam;hb=HEAD /lib/firmware/vicam/"
ok="/lib/firmware/vicam firmware.fw"
drivers="vicam"
class="video usb"

[whiteheat]
title="ConnectTech WhiteHEAT"
fw="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=whiteheat.fw;hb=HEAD http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob;f=whiteheat_loader.fw;hb=HEAD"
ok="/lib/firmware/whiteheat whiteheat.fw whiteheat_loader.fw"
drivers="whiteheat"
class="serial usb"

[zd1201]
title="ZyDAS zd1201 11 MBit/s"
fw="http://surfnet.dl.sourceforge.net/sourceforge/linux-lc100020/zd1201-0.14-fw.tar.gz"
ok="zd1201"
drivers="zd1201"
class="ieee802.11"

[zd1211]
title="ZyDAS zd1211 54 MBit/s"
fw="apt-get install zd1211-firmware"
ok="/lib/firmware/zd1211 zd1211"
drivers="zd1211*"
class="ieee802.11"

+ 63
- 0
fw-detect View File

@@ -0,0 +1,63 @@
#!/bin/bash
#
# Copyright 2007 Kel Modderman <kel@otaku42.de>
# License: GPLv2
#
# Script to check if firmware or other non-free drivers are required.
#
# Copyright 2009 Niall Walsh <niallwalsh@users.berlios.de>
# Major modifications to disconnect data from scripts

function selfhelp () {
echo "Usage:
$0 (-y|-i module) (-a) (-h) (-s) (-v) (-x)
-y try to install needed firmwares
-i module install firmware for given module
-a show information on all known modules
-h show this help message
-s enable short output mode
-v increase verbosity (repeat for more)
-x prints executed commands and their arguments for debugging
"
}

. /usr/share/siduction-scripts/fw

#
# check for get_dvb_firmware script
#
[[ -x $(which get_dvb_firmware) ]] && DVB=1 || DVB=0

while getopts ahisvxy opt; do
case "${opt}" in
a)
show_all_cards
;;
h)
selfhelp
exit
;;
i)
install_driver $2
;;
s)
short="TRUE"
;;
v)
((verbosity++))
;;
x)
set -x
;;
y)
#installable driver
short="TRUE"
install_possible="TRUE"
;;
*)
selfhelp
exit
esac
done

sys_detect

+ 39
- 0
fw-detect.1 View File

@@ -0,0 +1,39 @@
.TH "FW\-DETECT" "1" "2009-10-23" "Linux"
.SH "NAME"
fw\-detect \- Check system firmware status
.SH "SYNOPSIS"
.BR fw\-detect
.SH "DESCRIPTION"
.LP
.BR fw\-detect
fw\-detect scans the loaded modules on your system, checks if they require
firmware and checks if the firmware is present in the correct location.

By default it will only output information about any modules which appear to
require firmware. With the \-a option you can see the information for all
modules fw-detect knows about. With the \-y option it will attempt to install
any missing firmwares where possible. With the \-i option it will only attempt
to install missing firmware for the given module, though it will still provide
the information about other modules which it believes require firmware.
.SH OPTIONS
.TP
.IP \-a
Display information on all known modules.
.TP
\fB\-h\fR
Display help message.
.TP
\fB\-i \fI<module>\fR
Install firmware for given module.
.TP
\fB\-s\fR
Short output mode.
.TP
\fB\-v\fR
Increase verbosity (repeat for more).
.TP
\fB\-x\fR
Print commands and their arguments for debugging.
.TP
\fB\-y\fR
Try to install firmwares believed to be required.

+ 378
- 0
fw-html View File

@@ -0,0 +1,378 @@
#!/usr/bin/perl
#
# Copyright 2009 Niall Walsh <niallwalsh@users.berlios.de>
# License: GPLv2
#
# Script to convert fw-data.ini file to html
#
# Takes filename of ini file as input or defaults to fw-data.ini
# Writes (bare) html to stdout
#

use strict;

# TODO add some options properly
# -t|--template
# insert generated content into given file
# default value stdin
# -p|--pattern
# use given value as string to replace with content in template
# implies -t
# disables -w
# default off value <!-- fw-data -->
# -w|--wrap
# use given value as root path to header/footer
# disables -t/-p
# default on value fw-html.
# -i|--indent
# indent all content by this string
# automatically taken from template's pattern indent if -t
# default value ""