summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x0_format.sh7
-rwxr-xr-x1_makerootfs.sh7
-rwxr-xr-x2_install.sh7
-rwxr-xr-x3_configure.sh7
-rwxr-xr-x9_resync.sh7
-rwxr-xr-xchroot.sh5
-rw-r--r--common-functions (renamed from functions)0
-rw-r--r--common-settings12
-rwxr-xr-xmount.sh5
-rwxr-xr-xumount.sh5
10 files changed, 25 insertions, 37 deletions
diff --git a/0_format.sh b/0_format.sh
index 6004327..9438b3e 100755
--- a/0_format.sh
+++ b/0_format.sh
@@ -2,11 +2,8 @@
set -e
-. ./config-DEFAULTS || exit 1
-. ./config-HOST || exit 1
-. ./config-TARGET || exit 1
-. ./config-MANDATED || exit 1
-. ./functions || exit 1
+. ./common-setting || exit 1
+. ./common-functions || exit 1
#sfdisk -l "$usbdev_host"
#TODO: Ask if you really want to erase shown partitions
diff --git a/1_makerootfs.sh b/1_makerootfs.sh
index e9f732c..84ec475 100755
--- a/1_makerootfs.sh
+++ b/1_makerootfs.sh
@@ -2,11 +2,8 @@
set -e
-. ./config-DEFAULTS || exit 1
-. ./config-HOST || exit 1
-. ./config-TARGET || exit 1
-. ./config-MANDATED || exit 1
-. ./functions || exit 1
+. ./common-settings || exit 1
+. ./common-functions || exit 1
mkdir "$targettemp"
case "$debootstrap" in
diff --git a/2_install.sh b/2_install.sh
index 6a7745c..830a294 100755
--- a/2_install.sh
+++ b/2_install.sh
@@ -2,11 +2,8 @@
set -e
-. ./config-DEFAULTS || exit 1
-. ./config-HOST || exit 1
-. ./config-TARGET || exit 1
-. ./config-MANDATED || exit 1
-. ./functions || exit 1
+. ./common-settings || exit 1
+. ./common-functions || exit 1
# Save specs for debugging later
if [ -f "$baseworkdir/specs" ]; then
diff --git a/3_configure.sh b/3_configure.sh
index 8bf169d..98199c7 100755
--- a/3_configure.sh
+++ b/3_configure.sh
@@ -2,11 +2,8 @@
set -e
-. ./config-DEFAULTS || exit 1
-. ./config-HOST || exit 1
-. ./config-TARGET || exit 1
-. ./config-MANDATED || exit 1
-. ./functions || exit 1
+. ./common-settings || exit 1
+. ./common-functions || exit 1
# Check if already installed
if ! ./chroot.sh grep -q 'root::' "/etc/shadow"; then
diff --git a/9_resync.sh b/9_resync.sh
index ed2dd13..8771aa5 100755
--- a/9_resync.sh
+++ b/9_resync.sh
@@ -2,11 +2,8 @@
set -e
-. ./config-DEFAULTS || exit 1
-. ./config-HOST || exit 1
-. ./config-TARGET || exit 1
-. ./config-MANDATED || exit 1
-. ./functions || exit 1
+. ./common-settings || exit 1
+. ./common-functions || exit 1
mount "$rootdev_host" "$mountpoint"
rsync -av --delete --one-file-system "$mountpoint/"* "$targettemp/" --exclude 'etc/shadow*' --exclude 'etc/gshadow*' --exclude 'etc/ssh/ssh_host_*_key*' --exclude 'root/**' --dry-run
diff --git a/chroot.sh b/chroot.sh
index 76db488..3bdc9b3 100755
--- a/chroot.sh
+++ b/chroot.sh
@@ -1,9 +1,6 @@
#!/bin/sh
-. ./config-DEFAULTS || exit 1
-. ./config-HOST || exit 1
-. ./config-TARGET || exit 1
-. ./config-MANDATED || exit 1
+. ./common-settings || exit 1
if [ "$1" = "temp" ]; then
shift
diff --git a/functions b/common-functions
index 58536cf..58536cf 100644
--- a/functions
+++ b/common-functions
diff --git a/common-settings b/common-settings
new file mode 100644
index 0000000..000ca69
--- /dev/null
+++ b/common-settings
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Load settings
+
+set -e
+
+. ./config-DEFAULTS || exit 1
+. ./config-HOST || exit 1
+. ./config-TARGET || exit 1
+. ./config-MANDATED || exit 1
+
+exit 0
diff --git a/mount.sh b/mount.sh
index 599027a..b244725 100755
--- a/mount.sh
+++ b/mount.sh
@@ -2,10 +2,7 @@
set -e
-. ./config-DEFAULTS || exit 1
-. ./config-HOST || exit 1
-. ./config-TARGET || exit 1
-. ./config-MANDATED || exit 1
+. ./common-settings || exit 1
if [ "$1" = "temp" ]; then
target="$targettemp"
diff --git a/umount.sh b/umount.sh
index 9fc1a5b..bc7d153 100755
--- a/umount.sh
+++ b/umount.sh
@@ -1,9 +1,6 @@
#!/bin/sh
-. ./config-DEFAULTS || exit 1
-. ./config-HOST || exit 1
-. ./config-TARGET || exit 1
-. ./config-MANDATED || exit 1
+. ./common-settings || exit 1
if [ "$1" = "temp" ]; then
target="$targettemp"