Permalink
Browse files

Error message if no USB sound device is attached

  • Loading branch information...
1 parent e2c7f80 commit 872d8072c03c7c9c9ab1cc39fab56fd27e217737 probono committed Dec 29, 2013
Showing with 24 additions and 8 deletions.
  1. +6 −6 prepare
  2. +2 −1 traits/audio/radio/MANIFEST
  3. +16 −1 traits/audio/radio/files/www/cgi-bin/radio
View
12 prepare
@@ -1,9 +1,9 @@
#!/bin/bash
set -euf
# New Trunk
-IMAGEBUILDER_URL="http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2"
+##IMAGEBUILDER_URL="http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2"
# Caution: Snapshots are unstable
-#IMAGEBUILDER_URL="http://downloads.openwrt.org/snapshots/trunk/ar71xx/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64.tar.bz2"
+IMAGEBUILDER_URL="http://downloads.openwrt.org/snapshots/trunk/ar71xx/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64.tar.bz2"
cd $(dirname $(readlink -f $0))
@@ -16,10 +16,10 @@ if [ -z "${1:-}" ];then
fi
PROFILE=$1
if [ ! -e builder/Makefile ]; then
- #wget $IMAGEBUILDER_URL -O- | tar xj OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64
- #mv OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64 builder
- wget -O- $IMAGEBUILDER_URL | tar xj OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486
- mv -f OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486 builder
+ wget $IMAGEBUILDER_URL -O- | tar xj OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64
+ mv OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_64 builder
+ ##wget -O- $IMAGEBUILDER_URL | tar xj OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486
+ ##mv -f OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486 builder
echo "Builder successfully downloaded"
else
echo "Builder already installed, skipping download"
@@ -1 +1,2 @@
-PACKAGES="luci ser2net alsa-utils madplay luci-theme-bootstrap coreutils-stty nano kmod-usb-hid kmod-input-evdev triggerhappy -luci-proto-ppp -luci-lib-ipkg"
+PACKAGES="luci-mod-admin-full uhttpd libiwinfo-lua luci-theme-bootstrap -kmod-ipv6 -6relayd -ip6tables -odhcp6c ser2net alsa-utils madplay coreutils-stty nano kmod-usb-hid kmod-input-evdev triggerhappy -kmod-ppoe -kmod-pppox -dnsmasq -firewall"
+# -luci-proto-ppp -luci-lib-ipkg -luci-app-firewall -kmod-ppoe -kmod-pppox -dnsmasq -luci-proto-ppp -firewall"
@@ -47,7 +47,22 @@ echo '
echo '</head>
<body>
-<div class="container theme-showcase">'
+'
+
+# Display an error if USB sound card is not connected
+SPEAKER=$(amixer scontrols | head -n 1 | cut -d "'" -f 2)
+if [ "$SPEAKER" == "" ] ; then
+ echo '
+<div class="alert alert-error">
+ <a href="#" class="close" data-dismiss="alert">&times;</a>
+ <strong>Error!</strong> No USB sound device found. Please connect a compatible USB sound device.
+</div>
+</body>
+</html>
+'
+fi
+
+echo '<div class="container theme-showcase">'
# For centering (begin)
echo '

0 comments on commit 872d807

Please sign in to comment.