[pkg-fso-commits] [SCM] Debian packaging for uboot-envtools branch, udeb, updated. debian/20081215-2-11-g6187ca5

Per Andersson avtobiff at gmail.com
Wed Jun 23 21:46:10 UTC 2010


The following commit has been merged in the udeb branch:
commit 6187ca508fef87631e111a5ee583b5d51984f5d0
Author: Per Andersson <avtobiff at gmail.com>
Date:   Wed Jun 23 23:39:55 2010 +0200

    postinst and template

diff --git a/debian/uboot-envtools.postinst b/debian/uboot-envtools.postinst
new file mode 100644
index 0000000..fbddc22
--- /dev/null
+++ b/debian/uboot-envtools.postinst
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+[ ! -f /etc/fw_env.config ] || exit 0 # bail if already configured
+
+# ask debconf what user answered (if anything)
+db_get uboot-envtools/machine || true
+debconf_machine="$RET"
+
+# default to infer hardware, otherwise set machine to what user said
+machine="$(cat /proc/cpuinfo | sed 's/^Hardware:\s*//')"
+if [ "$debconf_machine" != "Automatic configuration" ]; then
+    machine="$debconf_machine"
+fi
+
+case "$machine" in
+    "Kurobox Pro" | "Buffalo/Revogear Kurobox Pro")
+        file="kurobox_pro.config"
+        ;;
+    "Linkstation Pro Live" | "Buffalo Linkstation Pro/Live")
+        file="linkstation_pro_live.config"
+        ;;
+    "Linkstation 2")
+        file="lsmipsel.config"
+        ;;
+    "Linkstation HG")
+        file="lsppchg.config"
+        ;;
+    "OpenMoko Neo 1973 (GTA01)" | "GTA01")
+        file="openmoko_gta01.config"
+        ;;
+    "OpenMoko FreeRunner (GTA02)" | "GTA02")
+        file="openmoko_gta02.config"
+        ;;
+    "QNAP TS-101")
+        file="qnap_ts101.config"
+        ;;
+    "QNAP TS-109/TS-209")
+        file="qnap_ts109-209.config"
+        ;;
+    "QNAP TS-119/TS-219")
+        file="qnap_ts119-219.config"
+        ;;
+    *) # Do not configure
+        exit 0
+        ;;
+esac
+
+cp "/usr/share/doc/uboot-envtools/examples/$file" /etc/fw_env.config
+
+#DEBHELPER#
diff --git a/debian/uboot-envtools.templates b/debian/uboot-envtools.templates
new file mode 100644
index 0000000..9e96da0
--- /dev/null
+++ b/debian/uboot-envtools.templates
@@ -0,0 +1,10 @@
+Template: uboot-envtools/machine
+Type: select
+Default: Automatic configuration
+Choices: Automatic configuration, Kurobox Pro, Linkstation Pro Live, Linkstation Mipsel, Linkstation HG, OpenMoko Neo 1973 (GTA01), OpenMoko FreeRunner (GTA02), QNAP TS-101, QNAP TS-109/TS-209, QNAP TS-119/TS-219, Do not configure
+_Description: Device to automaticatically configure for
+ The U-Boot boot loader has an environment stored on flash. The U-Boot
+ environment tools needs to be configured in order to be able to read and
+ modify this environment.
+ .
+ Depending on device, automatic configuration can be possible.

-- 
Debian packaging for uboot-envtools



More information about the pkg-fso-commits mailing list