From b0332e9c6fc70b5a891abecb7dd6e6c4383b7fcc Mon Sep 17 00:00:00 2001 From: Cameron Thompson <50184035+iamromulan@users.noreply.github.com> Date: Mon, 21 Jul 2025 21:50:04 -0400 Subject: [PATCH] Add base files --- .../control/base-files.conffiles | 16 + .../control/base-files.control | 11 + .../control/base-files.prerm | 4 + .../control/curl.control | 14 + .../openwrt-sdxlemur-skel/control/curl.prerm | 4 + .../control/dropbear.conffiles | 3 + .../control/dropbear.control | 14 + .../control/dropbear.prerm | 4 + .../control/libcurl4.control | 16 + .../control/libcurl4.prerm | 4 + .../control/libnghttp2-14.control | 15 + .../control/libnghttp2-14.prerm | 4 + .../control/libuci20130104.control | 14 + .../control/libuci20130104.prerm | 4 + .../control/openwrt-keyring.control | 13 + .../control/openwrt-keyring.prerm | 4 + .../openwrt-sdxlemur-skel/control/uci.control | 12 + .../openwrt-sdxlemur-skel/control/uci.prerm | 4 + .../openwrt-sdxlemur-skel/data/etc/banner | 8 + .../data/etc/banner.failsafe | 15 + .../data/etc/config/dropbear | 5 + .../data/etc/device_info | 4 + .../openwrt-sdxlemur-skel/data/etc/diag.sh | 52 +++ .../etc/dropbear/dropbear_ed25519_host_key | 0 .../data/etc/dropbear/dropbear_rsa_host_key | 0 .../openwrt-sdxlemur-skel/data/etc/ethers | 6 + .../openwrt-sdxlemur-skel/data/etc/fstab | 1 + .../openwrt-sdxlemur-skel/data/etc/group | 45 ++ .../openwrt-sdxlemur-skel/data/etc/hosts | 9 + .../openwrt-sdxlemur-skel/data/etc/inittab | 5 + .../openwrt-sdxlemur-skel/data/etc/mtab | 1 + .../data/etc/openwrt_release | 7 + .../data/etc/openwrt_version | 1 + .../data/etc/opkg/distfeeds.conf | 45 ++ .../data/etc/opkg/keys/0e0c46ac47ab6c1f | 2 + .../data/etc/opkg/keys/4d017e6f1ed5d616 | 2 + .../openwrt-sdxlemur-skel/data/etc/os-release | 1 + .../openwrt-sdxlemur-skel/data/etc/passwd | 23 + .../openwrt-sdxlemur-skel/data/etc/preinit | 29 ++ .../openwrt-sdxlemur-skel/data/etc/profile | 24 + .../openwrt-sdxlemur-skel/data/etc/protocols | 57 +++ .../openwrt-sdxlemur-skel/data/etc/rc.local | 4 + .../openwrt-sdxlemur-skel/data/etc/services | 173 +++++++ .../openwrt-sdxlemur-skel/data/etc/shadow | 23 + .../openwrt-sdxlemur-skel/data/etc/shells | 3 + .../openwrt-sdxlemur-skel/data/etc/shinit | 12 + .../data/etc/uci-defaults/10_migrate-shadow | 10 + .../etc/uci-defaults/12_network-generate-ula | 13 + .../data/lib/config/uci.sh | 163 +++++++ .../data/lib/functions.sh | 436 ++++++++++++++++++ .../data/lib/functions/service.sh | 103 +++++ .../openwrt-sdxlemur-skel/data/lib/libuci.so | Bin 0 -> 24619 bytes .../data/lib/preinit/00_preinit.conf | 13 + .../data/lib/preinit/02_default_set_state | 5 + .../data/lib/preinit/02_sysinfo | 10 + .../data/lib/preinit/10_indicate_failsafe | 17 + .../data/lib/preinit/10_indicate_preinit | 166 +++++++ .../data/lib/preinit/30_failsafe_wait | 98 ++++ .../data/lib/preinit/40_run_failsafe_hook | 16 + .../lib/preinit/50_indicate_regular_preinit | 9 + .../data/lib/preinit/70_initramfs_test | 12 + .../data/lib/preinit/80_mount_root | 35 ++ .../data/lib/preinit/99_10_failsafe_dropbear | 8 + .../data/lib/preinit/99_10_failsafe_login | 14 + .../data/lib/preinit/99_10_run_init | 8 + .../data/lib/upgrade/common.sh | 288 ++++++++++++ .../data/lib/upgrade/do_stage2 | 25 + .../data/lib/upgrade/fwtool.sh | 93 ++++ .../data/lib/upgrade/keep.d/base-files | 5 + .../lib/upgrade/keep.d/base-files-essential | 11 + .../data/lib/upgrade/nand.sh | 360 +++++++++++++++ .../data/lib/upgrade/stage2 | 175 +++++++ .../openwrt-sdxlemur-skel/data/sbin/uci | Bin 0 -> 12294 bytes .../openwrt-sdxlemur-skel/data/usr/bin/curl | Bin 0 -> 110683 bytes .../data/usr/bin/dbclient | 1 + .../data/usr/bin/dropbearkey | 1 + .../data/usr/lib/libcurl.so.4 | 1 + .../data/usr/lib/libcurl.so.4.8.0 | Bin 0 -> 296963 bytes .../data/usr/lib/libnghttp2.so.14 | 1 + .../data/usr/lib/libnghttp2.so.14.20.2 | Bin 0 -> 98346 bytes .../data/usr/lib/os-release | 18 + .../data/usr/libexec/login.sh | 3 + .../data/usr/sbin/dropbear | Bin 0 -> 135651 bytes 83 files changed, 2835 insertions(+) create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.conffiles create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.control create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.prerm create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/curl.control create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/curl.prerm create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.conffiles create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.control create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.prerm create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/libcurl4.control create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/libcurl4.prerm create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/libnghttp2-14.control create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/libnghttp2-14.prerm create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/libuci20130104.control create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/libuci20130104.prerm create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/openwrt-keyring.control create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/openwrt-keyring.prerm create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/uci.control create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/control/uci.prerm create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/banner create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/banner.failsafe create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/config/dropbear create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/device_info create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/diag.sh create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/dropbear/dropbear_ed25519_host_key create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/dropbear/dropbear_rsa_host_key create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/ethers create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/fstab create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/group create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/hosts create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/inittab create mode 120000 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/mtab create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/openwrt_release create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/openwrt_version create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/distfeeds.conf create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/keys/0e0c46ac47ab6c1f create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/keys/4d017e6f1ed5d616 create mode 120000 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/os-release create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/passwd create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/preinit create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/profile create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/protocols create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/rc.local create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/services create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shadow create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shells create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shinit create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/uci-defaults/10_migrate-shadow create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/uci-defaults/12_network-generate-ula create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/config/uci.sh create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/functions.sh create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/functions/service.sh create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/libuci.so create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/00_preinit.conf create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/02_default_set_state create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/02_sysinfo create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/10_indicate_failsafe create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/10_indicate_preinit create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/30_failsafe_wait create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/40_run_failsafe_hook create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/50_indicate_regular_preinit create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/70_initramfs_test create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/80_mount_root create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/99_10_failsafe_dropbear create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/99_10_failsafe_login create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/preinit/99_10_run_init create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/upgrade/common.sh create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/upgrade/do_stage2 create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/upgrade/fwtool.sh create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/upgrade/keep.d/base-files create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/upgrade/keep.d/base-files-essential create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/upgrade/nand.sh create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/upgrade/stage2 create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/sbin/uci create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/bin/curl create mode 120000 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/bin/dbclient create mode 120000 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/bin/dropbearkey create mode 120000 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/lib/libcurl.so.4 create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/lib/libcurl.so.4.8.0 create mode 120000 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/lib/libnghttp2.so.14 create mode 100644 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/lib/libnghttp2.so.14.20.2 create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/lib/os-release create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/libexec/login.sh create mode 100755 opkg-feed/installer/openwrt-sdxlemur-skel/data/usr/sbin/dropbear diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.conffiles b/opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.conffiles new file mode 100755 index 0000000..0a2427b --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.conffiles @@ -0,0 +1,16 @@ +/etc/ethers +/etc/group +/etc/hosts +/etc/inittab +/etc/iproute2/rt_protos +/etc/iproute2/rt_tables +/etc/passwd +/etc/profile +/etc/protocols +/etc/rc.local +/etc/services +/etc/shadow +/etc/shells +/etc/shinit +/etc/sysctl.conf +/etc/sysupgrade.conf diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.control b/opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.control new file mode 100755 index 0000000..9c80ee5 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.control @@ -0,0 +1,11 @@ +Package: base-files +Version: 11-r20134-5f15225c1e +Depends: libc, netifd, jsonfilter, usign, openwrt-keyring, ubi-utils, fstools, fwtool +Source: package/base-files +SourceName: base-files +License: GPL-2.0 +Section: base +SourceDateEpoch: 1723531680 +Architecture: arm_cortex-a7_neon-vfpv4 +Installed-Size: 46117 +Description: This package contains a base filesystem and system scripts for OpenWrt. diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.prerm b/opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.prerm new file mode 100755 index 0000000..12d06ec --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/base-files.prerm @@ -0,0 +1,4 @@ +#!/bin/sh +[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 +. ${IPKG_INSTROOT}/lib/functions.sh +default_prerm $0 $@ diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/curl.control b/opkg-feed/installer/openwrt-sdxlemur-skel/control/curl.control new file mode 100755 index 0000000..bdbdbf7 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/curl.control @@ -0,0 +1,14 @@ +Package: curl +Version: 8.10.0-1 +Depends: libc, libcurl4 +Source: owrt-feeds/packages/net/curl +SourceName: curl +License: MIT +LicenseFiles: COPYING +Section: net +SourceDateEpoch: 1733820553 +CPE-ID: cpe:/a:haxx:libcurl +Maintainer: Stan Grishin +Architecture: arm_cortex-a7_neon-vfpv4 +Installed-Size: 63662 +Description: A client-side URL transfer utility diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/curl.prerm b/opkg-feed/installer/openwrt-sdxlemur-skel/control/curl.prerm new file mode 100755 index 0000000..12d06ec --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/curl.prerm @@ -0,0 +1,4 @@ +#!/bin/sh +[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 +. ${IPKG_INSTROOT}/lib/functions.sh +default_prerm $0 $@ diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.conffiles b/opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.conffiles new file mode 100755 index 0000000..048365e --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.conffiles @@ -0,0 +1,3 @@ +/etc/config/dropbear +/etc/dropbear/dropbear_ed25519_host_key +/etc/dropbear/dropbear_rsa_host_key diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.control b/opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.control new file mode 100755 index 0000000..1668771 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.control @@ -0,0 +1,14 @@ +Package: dropbear +Version: 2022.82-3 +Depends: libc +Alternatives: 100:/usr/bin/scp:/usr/sbin/dropbear, 100:/usr/bin/ssh:/usr/sbin/dropbear +Source: package/network/services/dropbear +SourceName: dropbear +License: MIT +LicenseFiles: LICENSE libtomcrypt/LICENSE libtommath/LICENSE +Section: net +SourceDateEpoch: 1693376937 +CPE-ID: cpe:/a:matt_johnston:dropbear_ssh_server +Architecture: arm_cortex-a7_neon-vfpv4 +Installed-Size: 94020 +Description: A small SSH2 server/client designed for small memory environments. diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.prerm b/opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.prerm new file mode 100755 index 0000000..12d06ec --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/dropbear.prerm @@ -0,0 +1,4 @@ +#!/bin/sh +[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 +. ${IPKG_INSTROOT}/lib/functions.sh +default_prerm $0 $@ diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/libcurl4.control b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libcurl4.control new file mode 100755 index 0000000..c40116c --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libcurl4.control @@ -0,0 +1,16 @@ +Package: libcurl4 +Version: 8.10.0-1 +Depends: libc, libopenssl1.1, libnghttp2-14, ca-bundle +Provides: libcurl +Source: owrt-feeds/packages/net/curl +SourceName: libcurl +License: MIT +LicenseFiles: COPYING +Section: libs +SourceDateEpoch: 1733820553 +ABIVersion: 4 +CPE-ID: cpe:/a:haxx:libcurl +Maintainer: Stan Grishin +Architecture: arm_cortex-a7_neon-vfpv4 +Installed-Size: 198113 +Description: A client-side URL transfer library diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/libcurl4.prerm b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libcurl4.prerm new file mode 100755 index 0000000..12d06ec --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libcurl4.prerm @@ -0,0 +1,4 @@ +#!/bin/sh +[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 +. ${IPKG_INSTROOT}/lib/functions.sh +default_prerm $0 $@ diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/libnghttp2-14.control b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libnghttp2-14.control new file mode 100755 index 0000000..b12b808 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libnghttp2-14.control @@ -0,0 +1,15 @@ +Package: libnghttp2-14 +Version: 1.44.0-1 +Depends: libc +Provides: libnghttp2 +Source: owrt-feeds/packages/libs/nghttp2 +SourceName: libnghttp2 +License: MIT +LicenseFiles: COPYING +Section: libs +SourceDateEpoch: 1628451615 +ABIVersion: -14 +Maintainer: Hans Dedecker +Architecture: arm_cortex-a7_neon-vfpv4 +Installed-Size: 54175 +Description: C library implementing the framing layer of the HTTP/2 protocol. It can be used to build a HTTP/2-capable HTTP client or server diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/libnghttp2-14.prerm b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libnghttp2-14.prerm new file mode 100755 index 0000000..12d06ec --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libnghttp2-14.prerm @@ -0,0 +1,4 @@ +#!/bin/sh +[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 +. ${IPKG_INSTROOT}/lib/functions.sh +default_prerm $0 $@ diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/libuci20130104.control b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libuci20130104.control new file mode 100755 index 0000000..208db45 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libuci20130104.control @@ -0,0 +1,14 @@ +Package: libuci20130104 +Version: 2021-10-22-f84f49f0-6 +Depends: libc, libubox20220515 +Provides: libuci +Source: package/system/uci +SourceName: libuci +License: LGPL-2.1 +Section: libs +SourceDateEpoch: 1690286952 +ABIVersion: 20130104 +Maintainer: Felix Fietkau +Architecture: arm_cortex-a7_neon-vfpv4 +Installed-Size: 14700 +Description: C library for the Unified Configuration Interface (UCI) diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/libuci20130104.prerm b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libuci20130104.prerm new file mode 100755 index 0000000..12d06ec --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/libuci20130104.prerm @@ -0,0 +1,4 @@ +#!/bin/sh +[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 +. ${IPKG_INSTROOT}/lib/functions.sh +default_prerm $0 $@ diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/openwrt-keyring.control b/opkg-feed/installer/openwrt-sdxlemur-skel/control/openwrt-keyring.control new file mode 100755 index 0000000..3dbcf41 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/openwrt-keyring.control @@ -0,0 +1,13 @@ +Package: openwrt-keyring +Version: 2022-03-25-62471e69-3 +Depends: libc +Provides: lede-keyring +Source: package/system/openwrt-keyring +SourceName: openwrt-keyring +License: GPL-2.0 +Section: base +SourceDateEpoch: 1690286952 +Maintainer: John Crispin +Architecture: arm_cortex-a7_neon-vfpv4 +Installed-Size: 309 +Description: The keyring of with the developer using and gpg public keys. diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/openwrt-keyring.prerm b/opkg-feed/installer/openwrt-sdxlemur-skel/control/openwrt-keyring.prerm new file mode 100755 index 0000000..12d06ec --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/openwrt-keyring.prerm @@ -0,0 +1,4 @@ +#!/bin/sh +[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 +. ${IPKG_INSTROOT}/lib/functions.sh +default_prerm $0 $@ diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/uci.control b/opkg-feed/installer/openwrt-sdxlemur-skel/control/uci.control new file mode 100755 index 0000000..3f0ddf7 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/uci.control @@ -0,0 +1,12 @@ +Package: uci +Version: 2021-10-22-f84f49f0-6 +Depends: libc, libuci20130104 +Source: package/system/uci +SourceName: uci +License: LGPL-2.1 +Section: base +SourceDateEpoch: 1690286952 +Maintainer: Felix Fietkau +Architecture: arm_cortex-a7_neon-vfpv4 +Installed-Size: 7045 +Description: Utility for the Unified Configuration Interface (UCI) diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/control/uci.prerm b/opkg-feed/installer/openwrt-sdxlemur-skel/control/uci.prerm new file mode 100755 index 0000000..12d06ec --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/control/uci.prerm @@ -0,0 +1,4 @@ +#!/bin/sh +[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0 +. ${IPKG_INSTROOT}/lib/functions.sh +default_prerm $0 $@ diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/banner b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/banner new file mode 100755 index 0000000..22db091 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/banner @@ -0,0 +1,8 @@ + _______ ________ __ + | |.-----.-----.-----.| | | |.----.| |_ + | - || _ | -__| || | | || _|| _| + |_______|| __|_____|__|__||________||__| |____| + |__| W I R E L E S S F R E E D O M + ----------------------------------------------------- + OpenWrt 22.03.5, r20134-5f15225c1e + ----------------------------------------------------- diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/banner.failsafe b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/banner.failsafe new file mode 100755 index 0000000..49855e7 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/banner.failsafe @@ -0,0 +1,15 @@ +================= FAILSAFE MODE active ================ +special commands: +* firstboot reset settings to factory defaults +* mount_root mount root-partition with config files + +after mount_root: +* passwd change root's password +* /etc/config directory with config files + +for more help see: +https://openwrt.org/docs/guide-user/troubleshooting/ +- failsafe_and_factory_reset +- root_password_reset +======================================================= + diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/config/dropbear b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/config/dropbear new file mode 100644 index 0000000..2139ba0 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/config/dropbear @@ -0,0 +1,5 @@ +config dropbear + option PasswordAuth 'on' + option RootPasswordAuth 'on' + option Port '22' +# option BannerFile '/etc/banner' diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/device_info b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/device_info new file mode 100755 index 0000000..f180566 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/device_info @@ -0,0 +1,4 @@ +DEVICE_MANUFACTURER='Quectel' +DEVICE_MANUFACTURER_URL='https://quectel.com/' +DEVICE_PRODUCT='RM520N-GL' +DEVICE_REVISION='v0' diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/diag.sh b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/diag.sh new file mode 100755 index 0000000..37a8ec7 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/diag.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# Copyright (C) 2006-2019 OpenWrt.org + +. /lib/functions/leds.sh + +boot="$(get_dt_led boot)" +failsafe="$(get_dt_led failsafe)" +running="$(get_dt_led running)" +upgrade="$(get_dt_led upgrade)" + +set_led_state() { + status_led="$boot" + + case "$1" in + preinit) + status_led_blink_preinit + ;; + failsafe) + status_led_off + [ -n "$running" ] && { + status_led="$running" + status_led_off + } + status_led="$failsafe" + status_led_blink_failsafe + ;; + preinit_regular) + status_led_blink_preinit_regular + ;; + upgrade) + [ -n "$running" ] && { + status_led="$running" + status_led_off + } + status_led="$upgrade" + status_led_blink_preinit_regular + ;; + done) + status_led_off + [ "$status_led" != "$running" ] && \ + status_led_restore_trigger "boot" + [ -n "$running" ] && { + status_led="$running" + status_led_on + } + ;; + esac +} + +set_state() { + [ -n "$boot" -o -n "$failsafe" -o -n "$running" -o -n "$upgrade" ] && set_led_state "$1" +} diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/dropbear/dropbear_ed25519_host_key b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/dropbear/dropbear_ed25519_host_key new file mode 100644 index 0000000..e69de29 diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/dropbear/dropbear_rsa_host_key b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/dropbear/dropbear_rsa_host_key new file mode 100644 index 0000000..e69de29 diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/ethers b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/ethers new file mode 100755 index 0000000..b92c200 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/ethers @@ -0,0 +1,6 @@ +# +# Lookup man 5 ethers for syntax documentation +# +# Examples : +# 02:00:11:22:33:44 OpenWrt.lan +# 02:00:11:22:33:44 192.168.1.1 diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/fstab b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/fstab new file mode 100755 index 0000000..6e9b7ba --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/fstab @@ -0,0 +1 @@ +# diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/group b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/group new file mode 100755 index 0000000..812b824 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/group @@ -0,0 +1,45 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +dialout:x:20: +audio:x:29: +www-data:x:33: +ftp:x:55: +users:x:100: +network:x:101: +nogroup:x:65534: +radio:x:1001:radio,system +diag:x:2901:radio,diag +inet:x:3003:radio +net_admin:x:3005:radio +system:x:1000:radio,system +wifi:x:1010:radio,wifi,0 +netdev:x:996:radio +net_raw:x:3004:radio +kmsg:x:2902:radio +locclient:x:4021:radio,locclient +adb:x:2000:radio,adb +qbt:x:2888:qbt +ntp:x:123:ntp +dnsmasq:x:453:dnsmasq +ubi:x:3015:ubi +gps:x:1021:gps +logd:x:514:logd +wakelock:x:3010:radio +ubus:x:81:ubus +media:x:2807:media +input:x:1004:input +qrtr:x:2906:qrtr +rebooters:x:1301:diag +leprop:x:5002:leprop +readproc:x:3009: +qwes:x:3013: +sdcard:x:1015: +disk:x:6: +plugdev:x:272:system diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/hosts b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/hosts new file mode 100755 index 0000000..6f725b7 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/hosts @@ -0,0 +1,9 @@ +127.0.0.1 localhost OpenWrt + +# The following lines are desirable for IPv6 capable hosts +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +127.0.1.1 sdxlemur diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/inittab b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/inittab new file mode 100755 index 0000000..3085904 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/inittab @@ -0,0 +1,5 @@ +::sysinit:/etc/init.d/rcS S boot +::shutdown:/etc/init.d/rcS K shutdown +# avoid auto reboot by twice type ctrl+c +#::askconsole:/usr/libexec/login.sh +console::respawn:/usr/libexec/login.sh \ No newline at end of file diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/mtab b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/mtab new file mode 120000 index 0000000..4c0a094 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/mtab @@ -0,0 +1 @@ +/proc/mounts \ No newline at end of file diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/openwrt_release b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/openwrt_release new file mode 100755 index 0000000..7532bb3 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/openwrt_release @@ -0,0 +1,7 @@ +DISTRIB_ID='OpenWrt' +DISTRIB_RELEASE='22.03.5' +DISTRIB_REVISION='r20134-5f15225c1e' +DISTRIB_TARGET='sdxlemur/generic' +DISTRIB_ARCH='arm_cortex-a7_neon-vfpv4' +DISTRIB_DESCRIPTION='OpenWrt 22.03.5 r20134-5f15225c1e' +DISTRIB_TAINTS='no-all busybox override' diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/openwrt_version b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/openwrt_version new file mode 100755 index 0000000..a084779 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/openwrt_version @@ -0,0 +1 @@ +r20134-5f15225c1e diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/distfeeds.conf b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/distfeeds.conf new file mode 100644 index 0000000..6a2bf29 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/distfeeds.conf @@ -0,0 +1,45 @@ +src/gz openwrt_core https://downloads.openwrt.org/releases/22.03.5/targets/sdx35/generic/packages +src/gz openwrt_base https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/base +src/gz openwrt_luci https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/luci +src/gz openwrt_packages https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/packages +src/gz openwrt_qtiagm https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiagm +src/gz openwrt_qtiargs https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiargs +src/gz openwrt_qtiaudio https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiaudio +src/gz openwrt_qtiaudioprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiaudioprop +src/gz openwrt_qtibsp https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtibsp +src/gz openwrt_qtibspprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtibspprop +src/gz openwrt_qtibt https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtibt +src/gz openwrt_qtibtprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtibtprop +src/gz openwrt_qticore https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qticore +src/gz openwrt_qticoreinternal https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qticoreinternal +src/gz openwrt_qticoreprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qticoreprop +src/gz openwrt_qtictainternal https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtictainternal +src/gz openwrt_qtidata https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtidata +src/gz openwrt_qtidatainternal https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtidatainternal +src/gz openwrt_qtidataprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtidataprop +src/gz openwrt_qtigplv2 https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtigplv2 +src/gz openwrt_qtiipq https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiipq +src/gz openwrt_qtiipqezmesh https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiipqezmesh +src/gz openwrt_qtiipqprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiipqprop +src/gz openwrt_qtilocation https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtilocation +src/gz openwrt_qtilocationinternal https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtilocationinternal +src/gz openwrt_qtilocationprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtilocationprop +src/gz openwrt_qtimsdcprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtimsdcprop +src/gz openwrt_qtinternal https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtinternal +src/gz openwrt_qtipal https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtipal +src/gz openwrt_qtiperfprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiperfprop +src/gz openwrt_qtippatprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtippatprop +src/gz openwrt_qtiquectel https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiquectel +src/gz openwrt_qtiquectelprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiquectelprop +src/gz openwrt_qtirilprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtirilprop +src/gz openwrt_qtisecurity https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtisecurity +src/gz openwrt_qtisecurityinternal https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtisecurityinternal +src/gz openwrt_qtisecurityprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtisecurityprop +src/gz openwrt_qtisensorsinternal https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtisensorsinternal +src/gz openwrt_qtisensorsprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtisensorsprop +src/gz openwrt_qtissdk https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtissdk +src/gz openwrt_qtissmgr https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtissmgr +src/gz openwrt_qtissmgrprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtissmgrprop +src/gz openwrt_qtiwlan https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiwlan +src/gz openwrt_qtiwlanprop https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/qtiwlanprop +src/gz openwrt_routing https://downloads.openwrt.org/releases/22.03.5/packages/arm_cortex-a7_neon-vfpv4/routing diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/keys/0e0c46ac47ab6c1f b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/keys/0e0c46ac47ab6c1f new file mode 100644 index 0000000..621ef04 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/keys/0e0c46ac47ab6c1f @@ -0,0 +1,2 @@ +untrusted comment: Local build key +RWQODEasR6tsH514leJOAtQhEuP8a5EB2t0vTChH+OJPP7Stc6Q7gDOg diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/keys/4d017e6f1ed5d616 b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/keys/4d017e6f1ed5d616 new file mode 100644 index 0000000..eaa4a86 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/opkg/keys/4d017e6f1ed5d616 @@ -0,0 +1,2 @@ +untrusted comment: Public usign key for 22.03 release builds +RWRNAX5vHtXWFmt+n5di7XX8rTu0w+c8X7Ihv4oCyD6tzsUwmH0A6kO0 diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/os-release b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/os-release new file mode 120000 index 0000000..c4c75b4 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/os-release @@ -0,0 +1 @@ +../usr/lib/os-release \ No newline at end of file diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/passwd b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/passwd new file mode 100755 index 0000000..09833e2 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/passwd @@ -0,0 +1,23 @@ +root:x:0:0:root:/root:/bin/ash +daemon:*:1:1:daemon:/var:/bin/false +ftp:*:55:55:ftp:/home/ftp:/bin/false +network:*:101:101:network:/var:/bin/false +nobody:*:65534:65534:nobody:/var:/bin/false +radio:x:1001:1001:radio:/var/run/radio:/bin/false +qbt:x:2888:2888:qbt:/var/run/qbt:/bin/false +ntp:x:123:123:ntp:/var/run/ntp:/bin/false +system:x:1000:1000:system:/var/run/system:/bin/false +dnsmasq:x:453:453:dnsmasq:/var/run/dnsmasq:/bin/false +ubi:x:3015:3015:ubi:/var/run/ubi:/bin/false +wifi:x:1010:1010:wifi:/var/run/wifi:/bin/false +0:x:65536:1010:0:/var/run/0:/bin/false +gps:x:1021:1021:gps:/var/run/gps:/bin/false +locclient:x:4021:4021:locclient:/var/run/locclient:/bin/false +logd:x:514:514:logd:/var/run/logd:/bin/false + +adb:x:2000:2000:adb:/var/run/adb:/bin/false +media:x:2807:2807:media:/var/run/media:/bin/false +input:x:1004:1004:input:/var/run/input:/bin/false +qrtr:x:2906:2906:qrtr:/var/run/qrtr:/bin/false +diag:x:2901:2901:diag:/var/run/diag:/bin/false +leprop:x:5002:5002:leprop:/var/run/leprop:/bin/false diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/preinit b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/preinit new file mode 100755 index 0000000..5f1ca15 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/preinit @@ -0,0 +1,29 @@ +#!/bin/sh +# Copyright (C) 2006-2016 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +[ -z "$PREINIT" ] && exec /sbin/init + +export PATH="/usr/sbin:/usr/bin:/sbin:/bin" + +. /lib/functions.sh +. /lib/functions/preinit.sh +. /lib/functions/system.sh + +boot_hook_init preinit_essential +boot_hook_init preinit_main +boot_hook_init failsafe +boot_hook_init initramfs +boot_hook_init preinit_mount_root + +for pi_source_file in /lib/preinit/*; do + . $pi_source_file +done + +boot_run_hook preinit_essential + +pi_mount_skip_next=false +pi_jffs2_mount_success=false +pi_failsafe_net_message=false + +boot_run_hook preinit_main diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/profile b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/profile new file mode 100755 index 0000000..316d528 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/profile @@ -0,0 +1,24 @@ +[ -e /tmp/.failsafe ] && export FAILSAFE=1 + +[ -f /etc/banner ] && cat /etc/banner +[ -n "$FAILSAFE" ] && cat /etc/banner.failsafe + + +export PATH="/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6) +export HOME=${HOME:-/root} +export PS1='\u@\h:\w\$ ' +export ENV=/etc/shinit + +case "$TERM" in + xterm*|rxvt*) + export PS1='\[\e]0;\u@\h: \w\a\]'$PS1 + ;; +esac + +[ -n "$FAILSAFE" ] || { + for FILE in /etc/profile.d/*.sh; do + [ -e "$FILE" ] && . "$FILE" + done + unset FILE +} diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/protocols b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/protocols new file mode 100755 index 0000000..26bc775 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/protocols @@ -0,0 +1,57 @@ +# Internet (IP) protocols +# +# Updated from http://www.iana.org/assignments/protocol-numbers and other +# sources. +# New protocols will be added on request if they have been officially +# assigned by IANA and are not historical. +# If you need a huge list of used numbers please install the nmap package. + +ip 0 IP # internet protocol, pseudo protocol number +#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883] +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # Internet Group Management +ggp 3 GGP # gateway-gateway protocol +ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') +st 5 ST # ST datagram mode +tcp 6 TCP # transmission control protocol +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco) +pup 12 PUP # PARC universal packet protocol +udp 17 UDP # user datagram protocol +hmp 20 HMP # host monitoring protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +rdp 27 RDP # "reliable datagram" protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905] +dccp 33 DCCP # Datagram Congestion Control Protocol [RFC4340] +xtp 36 XTP # Xpress Transfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport +ipv6 41 IPv6 # Internet Protocol, version 6 +ipv6-route 43 IPv6-Route # Routing Header for IPv6 +ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Reservation Protocol +gre 47 GRE # General Routing Encapsulation +esp 50 IPSEC-ESP # Encap Security Payload [RFC2046] +ah 51 IPSEC-AH # Authentication Header [RFC2402] +skip 57 SKIP # SKIP +ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6 +ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6 +ipv6-opts 60 IPv6-Opts # Destination Options for IPv6 +rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB) +vmtp 81 VMTP # Versatile Message Transport +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +ax.25 93 AX.25 # AX.25 frames +ipip 94 IPIP # IP-within-IP Encapsulation Protocol +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378] +encap 98 ENCAP # Yet Another IP encapsulation [RFC1241] +# 99 # any private encryption scheme +pim 103 PIM # Protocol Independent Multicast +ipcomp 108 IPCOMP # IP Payload Compression Protocol +vrrp 112 VRRP # Virtual Router Redundancy Protocol +l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661] +isis 124 ISIS # IS-IS over IPv4 +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel + diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/rc.local b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/rc.local new file mode 100755 index 0000000..5639477 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/rc.local @@ -0,0 +1,4 @@ +# Put your custom commands here that should be executed once +# the system init finished. By default this file does nothing. + +exit 0 diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/services b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/services new file mode 100755 index 0000000..968f9e7 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/services @@ -0,0 +1,173 @@ +echo 7/tcp +echo 7/udp +discard 9/tcp +discard 9/udp +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +chargen 19/tcp +chargen 19/udp +ftp-data 20/tcp +ftp 21/tcp +ssh 22/tcp +ssh 22/udp +telnet 23/tcp +smtp 25/tcp +time 37/tcp +time 37/udp +whois 43/tcp +domain 53/tcp +domain 53/udp +bootps 67/tcp +bootps 67/udp +bootpc 68/tcp +bootpc 68/udp +tftp 69/udp +finger 79/tcp +www 80/tcp http +kerberos 88/tcp kerberos5 krb5 kerberos-sec +kerberos 88/udp kerberos5 krb5 kerberos-sec +pop3 110/tcp +pop3 110/udp +sunrpc 111/tcp rpcbind +sunrpc 111/udp rpcbind +auth 113/tcp ident +sftp 115/tcp +nntp 119/tcp +ntp 123/tcp +ntp 123/udp +netbios-ns 137/tcp +netbios-ns 137/udp +netbios-dgm 138/tcp +netbios-dgm 138/udp +netbios-ssn 139/tcp +netbios-ssn 139/udp +imap2 143/tcp imap +imap2 143/udp imap +snmp 161/tcp +snmp 161/udp +snmp-trap 162/tcp snmptrap +snmp-trap 162/udp snmptrap +xdmcp 177/tcp +xdmcp 177/udp +bgp 179/tcp +bgp 179/udp +imap3 220/tcp +imap3 220/udp +ldap 389/tcp +ldap 389/udp +https 443/tcp +https 443/udp +microsoft-ds 445/tcp +microsoft-ds 445/udp +isakmp 500/tcp +isakmp 500/udp +rtsp 554/tcp +rtsp 554/udp +ipp 631/tcp +ipp 631/udp +syslog 514/udp +printer 515/tcp spooler +dhcpv6-client 546/tcp +dhcpv6-client 546/udp +dhcpv6-server 547/tcp +dhcpv6-server 547/udp +afpovertcp 548/tcp +afpovertcp 548/udp +nntps 563/tcp snntp +nntps 563/udp snntp +submission 587/tcp +submission 587/udp +ldaps 636/tcp +ldaps 636/udp +tinc 655/tcp +tinc 655/udp +rsync 873/tcp +rsync 873/udp +ftps-data 989/tcp +ftps 990/tcp +imaps 993/tcp +imaps 993/udp +ircs 994/tcp +ircs 994/udp +pop3s 995/tcp +pop3s 995/udp +socks 1080/tcp +socks 1080/udp +openvpn 1194/tcp +openvpn 1194/udp +l2f 1701/tcp l2tp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct +radius-acct 1813/udp radacct +nfs 2049/tcp +nfs 2049/udp +dict 2628/tcp +dict 2628/udp +gpsd 2947/tcp +gpsd 2947/udp +icpv2 3130/tcp icp +icpv2 3130/udp icp +mysql 3306/tcp +mysql 3306/udp +nut 3493/tcp +nut 3493/udp +distcc 3632/tcp +distcc 3632/udp +daap 3689/tcp +daap 3689/udp +svn 3690/tcp subversion +svn 3690/udp subversion +epmd 4369/tcp +epmd 4369/udp +iax 4569/tcp +iax 4569/udp +mtn 4691/tcp +mtn 4691/udp +munin 4949/tcp +sip 5060/tcp +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +xmpp-client 5222/tcp jabber-client +xmpp-client 5222/udp jabber-client +xmpp-server 5269/tcp jabber-server +xmpp-server 5269/udp jabber-server +mdns 5353/tcp +mdns 5353/udp +postgresql 5432/tcp postgres +postgresql 5432/udp postgres +x11 6000/tcp +x11 6000/udp +mysql-proxy 6446/tcp +mysql-proxy 6446/udp +bacula-dir 9101/tcp +bacula-dir 9101/udp +bacula-fd 9102/tcp +bacula-fd 9102/udp +bacula-sd 9103/tcp +bacula-sd 9103/udp +nbd 10809/tcp +zabbix-agent 10050/tcp +zabbix-agent 10050/udp +zabbix-trapper 10051/tcp +zabbix-trapper 10051/udp +hkp 11371/tcp +hkp 11371/udp +ssmtp 465/tcp smtps +spamd 783/tcp +zebrasrv 2600/tcp +zebra 2601/tcp +ripd 2602/tcp +ripngd 2603/tcp +ospfd 2604/tcp +bgpd 2605/tcp +ospf6d 2606/tcp +ospfapi 2607/tcp +isisd 2608/tcp +sane-port 6566/tcp sane saned +ircd 6667/tcp +git 9418/tcp + diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shadow b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shadow new file mode 100644 index 0000000..f1a59e3 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shadow @@ -0,0 +1,23 @@ +root:::0:99999:7::: +daemon:*:0:0:99999:7::: +ftp:*:0:0:99999:7::: +network:*:0:0:99999:7::: +nobody:*:0:0:99999:7::: +radio:x:0:0:99999:7::: +qbt:x:0:0:99999:7::: +ntp:x:0:0:99999:7::: +system:x:0:0:99999:7::: +dnsmasq:x:0:0:99999:7::: +ubi:x:0:0:99999:7::: +wifi:x:0:0:99999:7::: +0:x:0:0:99999:7::: +gps:x:0:0:99999:7::: +locclient:x:0:0:99999:7::: +logd:x:0:0:99999:7::: +ubus:x:0:0:99999:7::: +adb:x:0:0:99999:7::: +media:x:0:0:99999:7::: +input:x:0:0:99999:7::: +qrtr:x:0:0:99999:7::: +diag:x:0:0:99999:7::: +leprop:x:0:0:99999:7::: diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shells b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shells new file mode 100755 index 0000000..610391e --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shells @@ -0,0 +1,3 @@ +/bin/ash +/bin/sh +/bin/bash diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shinit b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shinit new file mode 100755 index 0000000..8df9771 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/shinit @@ -0,0 +1,12 @@ +[ -x /bin/more ] || [ -x /usr/bin/more ] || alias more=less +[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi + +alias ll='ls -alF --color=auto' + +[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc + +[ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; } +[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; } + +[ -n "$KSH_VERSION" -o \! -s "$HOME/.shinit" ] || . "$HOME/.shinit" +[ -z "$KSH_VERSION" -o \! -s "$HOME/.mkshrc" ] || . "$HOME/.mkshrc" diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/uci-defaults/10_migrate-shadow b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/uci-defaults/10_migrate-shadow new file mode 100755 index 0000000..481444f --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/uci-defaults/10_migrate-shadow @@ -0,0 +1,10 @@ +ppwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/passwd)" +spwd="$(sed -ne '/^root:/s/^root:\([^:]*\):.*$/\1/p' /etc/shadow)" + +if [ -n "${ppwd#[\!x]}" ] && [ -z "${spwd#[\!x]}" ]; then + logger -t migrate-shadow "Moving root password hash into shadow database" + sed -i -e "s:^root\:[^\:]*\::root\:x\::" /etc/passwd + sed -i -e "s:^root\:[^\:]*\::root\:$ppwd\::" /etc/shadow +fi + +exit 0 diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/uci-defaults/12_network-generate-ula b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/uci-defaults/12_network-generate-ula new file mode 100755 index 0000000..19d7ed7 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/etc/uci-defaults/12_network-generate-ula @@ -0,0 +1,13 @@ +[ "$(uci -q get network.globals.ula_prefix)" != "auto" ] && exit 0 + +r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"') +r2=$(dd if=/dev/urandom bs=2 count=1 |hexdump -e '2/1 "%02x"') +r3=$(dd if=/dev/urandom bs=2 count=1 |hexdump -e '2/1 "%02x"') + +uci -q batch <<-EOF >/dev/null + set network.globals.ula_prefix=fd$r1:$r2:$r3::/48 + commit network +EOF + +exit 0 + diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/config/uci.sh b/opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/config/uci.sh new file mode 100755 index 0000000..6ebfb73 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/config/uci.sh @@ -0,0 +1,163 @@ +# Shell script compatibility wrappers for /sbin/uci +# +# Copyright (C) 2008-2010 OpenWrt.org +# Copyright (C) 2008 Felix Fietkau +# +# 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 2 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +CONFIG_APPEND= +uci_load() { + local PACKAGE="$1" + local DATA + local RET + local VAR + + _C=0 + if [ -z "$CONFIG_APPEND" ]; then + for VAR in $CONFIG_LIST_STATE; do + export ${NO_EXPORT:+-n} CONFIG_${VAR}= + export ${NO_EXPORT:+-n} CONFIG_${VAR}_LENGTH= + done + export ${NO_EXPORT:+-n} CONFIG_LIST_STATE= + export ${NO_EXPORT:+-n} CONFIG_SECTIONS= + export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=0 + export ${NO_EXPORT:+-n} CONFIG_SECTION= + fi + + DATA="$(/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} ${LOAD_STATE:+-P /var/state} -S -n export "$PACKAGE" 2>/dev/null)" + RET="$?" + [ "$RET" != 0 -o -z "$DATA" ] || eval "$DATA" + unset DATA + + ${CONFIG_SECTION:+config_cb} + return "$RET" +} + +uci_set_default() { + local PACKAGE="$1" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q show "$PACKAGE" > /dev/null && return 0 + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} import "$PACKAGE" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit "$PACKAGE" +} + +uci_revert_state() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -P /var/state revert "$PACKAGE${CONFIG:+.$CONFIG}${OPTION:+.$OPTION}" +} + +uci_set_state() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + local VALUE="$4" + + [ "$#" = 4 ] || return 0 + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -P /var/state set "$PACKAGE.$CONFIG${OPTION:+.$OPTION}=$VALUE" +} + +uci_toggle_state() { + uci_revert_state "$1" "$2" "$3" + uci_set_state "$1" "$2" "$3" "$4" +} + +uci_set() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + local VALUE="$4" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set "$PACKAGE.$CONFIG.$OPTION=$VALUE" +} + +uci_add_list() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + local VALUE="$4" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} add_list "$PACKAGE.$CONFIG.$OPTION=$VALUE" +} + +uci_get_state() { + uci_get "$1" "$2" "$3" "$4" "/var/state" +} + +uci_get() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + local DEFAULT="$4" + local STATE="$5" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} ${STATE:+-P $STATE} -q get "$PACKAGE${CONFIG:+.$CONFIG}${OPTION:+.$OPTION}" + RET="$?" + [ "$RET" -ne 0 ] && [ -n "$DEFAULT" ] && echo "$DEFAULT" + return "$RET" +} + +uci_add() { + local PACKAGE="$1" + local TYPE="$2" + local CONFIG="$3" + + if [ -z "$CONFIG" ]; then + export ${NO_EXPORT:+-n} CONFIG_SECTION="$(/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} add "$PACKAGE" "$TYPE")" + else + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set "$PACKAGE.$CONFIG=$TYPE" + export ${NO_EXPORT:+-n} CONFIG_SECTION="$CONFIG" + fi +} + +uci_rename() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + local VALUE="$4" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} rename "$PACKAGE.$CONFIG${VALUE:+.$OPTION}=${VALUE:-$OPTION}" +} + +uci_remove() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} del "$PACKAGE.$CONFIG${OPTION:+.$OPTION}" +} + +uci_remove_list() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + local VALUE="$4" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} del_list "$PACKAGE.$CONFIG.$OPTION=$VALUE" +} + +uci_revert() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} revert "$PACKAGE${CONFIG:+.$CONFIG}${OPTION:+.$OPTION}" +} + +uci_commit() { + local PACKAGE="$1" + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit $PACKAGE +} diff --git a/opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/functions.sh b/opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/functions.sh new file mode 100755 index 0000000..4b1b838 --- /dev/null +++ b/opkg-feed/installer/openwrt-sdxlemur-skel/data/lib/functions.sh @@ -0,0 +1,436 @@ +# Copyright (C) 2006-2014 OpenWrt.org +# Copyright (C) 2006 Fokus Fraunhofer +# Copyright (C) 2010 Vertical Communications + + +debug () { + ${DEBUG:-:} "$@" +} + +# newline +N=" +" + +_C=0 +NO_EXPORT=1 +LOAD_STATE=1 +LIST_SEP=" " + +# xor multiple hex values of the same length +xor() { + local val + local ret="0x$1" + local retlen=${#1} + + shift + while [ -n "$1" ]; do + val="0x$1" + ret=$((ret ^ val)) + shift + done + + printf "%0${retlen}x" "$ret" +} + +append() { + local var="$1" + local value="$2" + local sep="${3:- }" + + eval "export ${NO_EXPORT:+-n} -- \"$var=\${$var:+\${$var}\${value:+\$sep}}\$value\"" +} + +list_contains() { + local var="$1" + local str="$2" + local val + + eval "val=\" \${$var} \"" + [ "${val%% $str *}" != "$val" ] +} + +config_load() { + [ -n "$IPKG_INSTROOT" ] && return 0 + uci_load "$@" +} + +reset_cb() { + config_cb() { return 0; } + option_cb() { return 0; } + list_cb() { return 0; } +} +reset_cb + +package() { + return 0 +} + +config () { + local cfgtype="$1" + local name="$2" + + export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=$((CONFIG_NUM_SECTIONS + 1)) + name="${name:-cfg$CONFIG_NUM_SECTIONS}" + append CONFIG_SECTIONS "$name" + export ${NO_EXPORT:+-n} CONFIG_SECTION="$name" + config_set "$CONFIG_SECTION" "TYPE" "${cfgtype}" + [ -n "$NO_CALLBACK" ] || config_cb "$cfgtype" "$name" +} + +option () { + local varname="$1"; shift + local value="$*" + + config_set "$CONFIG_SECTION" "${varname}" "${value}" + [ -n "$NO_CALLBACK" ] || option_cb "$varname" "$*" +} + +list() { + local varname="$1"; shift + local value="$*" + local len + + config_get len "$CONFIG_SECTION" "${varname}_LENGTH" 0 + [ $len = 0 ] && append CONFIG_LIST_STATE "${CONFIG_SECTION}_${varname}" + len=$((len + 1)) + config_set "$CONFIG_SECTION" "${varname}_ITEM$len" "$value" + config_set "$CONFIG_SECTION" "${varname}_LENGTH" "$len" + append "CONFIG_${CONFIG_SECTION}_${varname}" "$value" "$LIST_SEP" + [ -n "$NO_CALLBACK" ] || list_cb "$varname" "$*" +} + +config_unset() { + config_set "$1" "$2" "" +} + +# config_get