summaryrefslogtreecommitdiffstats
path: root/system-config/examples/live-config-foobar
diff options
context:
space:
mode:
Diffstat (limited to 'system-config/examples/live-config-foobar')
-rwxr-xr-xsystem-config/examples/live-config-foobar/components/9000-foobar67
-rw-r--r--system-config/examples/live-config-foobar/configs/foobar.conf12
-rw-r--r--system-config/examples/live-config-foobar/debian/changelog6
-rw-r--r--system-config/examples/live-config-foobar/debian/compat1
-rw-r--r--system-config/examples/live-config-foobar/debian/control18
-rw-r--r--system-config/examples/live-config-foobar/debian/copyright30
-rw-r--r--system-config/examples/live-config-foobar/debian/install2
-rwxr-xr-xsystem-config/examples/live-config-foobar/debian/rules7
-rw-r--r--system-config/examples/live-config-foobar/debian/source/format1
-rw-r--r--system-config/examples/live-config-foobar/debian/source/local-options1
-rw-r--r--system-config/examples/live-config-foobar/debian/source/options1
11 files changed, 146 insertions, 0 deletions
diff --git a/system-config/examples/live-config-foobar/components/9000-foobar b/system-config/examples/live-config-foobar/components/9000-foobar
new file mode 100755
index 0000000..136943b
--- /dev/null
+++ b/system-config/examples/live-config-foobar/components/9000-foobar
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+## live-config-foobar(7) - Additional Configuration Components for live systems
+## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
+## Copyright (C) 2015 John Doe <john@example.org>
+##
+## live-config-foobar comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+set -e
+
+Cmdline ()
+{
+ # Boot parameters can be acted up either this way...
+ if ! echo ${LIVE_CONFIG_CMDLINE} | grep -qs "example.foobar" && \
+ ! echo ${LIVE_CONFIG_CMDLINE} | grep -qs "foobar"
+ then
+ return
+ fi
+
+ # ...or if you want to specify certain options:
+ for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
+ do
+ case "${_PARAMETER}" in
+ example.foobar=*|foobar=*)
+ EXAMPLE_FOOBAR="${_PARAMETER#*foobar=}"
+ ;;
+ esac
+ done
+}
+
+Init ()
+{
+ # Checking if package is installed or already configured
+ if [ ! -e /var/lib/dpkg/info/foobar.list ] || \
+ [ -e /var/lib/live/config/foobar ]
+ then
+ exit 0
+ fi
+
+ echo -n " foobar"
+}
+
+Config ()
+{
+ # Configuring foobar either this way...
+ if [ -n "${EXAMPLE_FOOBAR}" ]
+ then
+ sleep 1
+ fi
+
+ # ...or if you want to specify certain options:
+ case "${EXAMPLE_FOOBAR}" in
+ foo)
+ sleep 1
+ ;;
+ esac
+
+ # Creating state file
+ touch /var/lib/live/config/foobar
+}
+
+Cmdline
+Init
+Config
diff --git a/system-config/examples/live-config-foobar/configs/foobar.conf b/system-config/examples/live-config-foobar/configs/foobar.conf
new file mode 100644
index 0000000..eaa3e2c
--- /dev/null
+++ b/system-config/examples/live-config-foobar/configs/foobar.conf
@@ -0,0 +1,12 @@
+# /etc/live/config.conf.d/foobar.conf
+
+## live-config-foobar(7) - Additional Configuration Components for live systems
+## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
+## Copyright (C) 2015 John Doe <john@example.org>
+##
+## live-config-foobar comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+EXAMPLE_FOOBAR="foobar"
diff --git a/system-config/examples/live-config-foobar/debian/changelog b/system-config/examples/live-config-foobar/debian/changelog
new file mode 100644
index 0000000..d68a822
--- /dev/null
+++ b/system-config/examples/live-config-foobar/debian/changelog
@@ -0,0 +1,6 @@
+live-config-foobar (5-1) unstable; urgency=low
+
+ * Initial release based on the live-config-foobar example package
+ included in live-config.
+
+ -- John Doe <john@example.org> Wed, 01 Jan 2015 00:00:00 +0100
diff --git a/system-config/examples/live-config-foobar/debian/compat b/system-config/examples/live-config-foobar/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/system-config/examples/live-config-foobar/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/system-config/examples/live-config-foobar/debian/control b/system-config/examples/live-config-foobar/debian/control
new file mode 100644
index 0000000..f976b16
--- /dev/null
+++ b/system-config/examples/live-config-foobar/debian/control
@@ -0,0 +1,18 @@
+Source: live-config-foobar
+Section: misc
+Priority: extra
+Maintainer: John Doe <john@example.org>
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
+Homepage: http://www.example.org/foobar/
+Vcs-Browser: http://git.example.org/?p=live-config-foobar.git
+Vcs-Git: git://git.example.org/git/live-config-foobar.git
+
+Package: live-config-foobar
+Architecture: all
+Depends: ${misc:Depends}, live-config (>= 5), live-config (<< 6)
+Description: Additional Live System Configuration Components (foobar)
+ live-config contains the components that configure a live system during the
+ boot process (late userspace).
+ .
+ This package contains the additional foobar component(s).
diff --git a/system-config/examples/live-config-foobar/debian/copyright b/system-config/examples/live-config-foobar/debian/copyright
new file mode 100644
index 0000000..de1526a
--- /dev/null
+++ b/system-config/examples/live-config-foobar/debian/copyright
@@ -0,0 +1,30 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: live-config-foobar
+Upstream-Contact: John Doe <john@example.org>
+Source: http://www.example.org/foobar/
+Comment:
+ This package is based on the live-config-foobar example package
+ included in live-config which can be obtained from
+ http://live-systems.org/devel/live-config/.
+
+Files: *
+Copyright: 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
+ 2015 John Doe <john@example.org>
+License: GPL-3+
+
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ The complete text of the GNU General Public License
+ can be found in /usr/share/common-licenses/GPL-3 file.
diff --git a/system-config/examples/live-config-foobar/debian/install b/system-config/examples/live-config-foobar/debian/install
new file mode 100644
index 0000000..dd1fb94
--- /dev/null
+++ b/system-config/examples/live-config-foobar/debian/install
@@ -0,0 +1,2 @@
+configs/* /etc/live/config.conf.d
+components/* /lib/live/config
diff --git a/system-config/examples/live-config-foobar/debian/rules b/system-config/examples/live-config-foobar/debian/rules
new file mode 100755
index 0000000..bd5d614
--- /dev/null
+++ b/system-config/examples/live-config-foobar/debian/rules
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+ dh ${@}
+
+override_dh_builddeb:
+ dh_builddeb -- -Zxz
diff --git a/system-config/examples/live-config-foobar/debian/source/format b/system-config/examples/live-config-foobar/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/system-config/examples/live-config-foobar/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/system-config/examples/live-config-foobar/debian/source/local-options b/system-config/examples/live-config-foobar/debian/source/local-options
new file mode 100644
index 0000000..2ee6f0f
--- /dev/null
+++ b/system-config/examples/live-config-foobar/debian/source/local-options
@@ -0,0 +1 @@
+abort-on-upstream-changes
diff --git a/system-config/examples/live-config-foobar/debian/source/options b/system-config/examples/live-config-foobar/debian/source/options
new file mode 100644
index 0000000..5bd47b7
--- /dev/null
+++ b/system-config/examples/live-config-foobar/debian/source/options
@@ -0,0 +1 @@
+compression = xz