diff options
-rwxr-xr-x | 0_format.sh | 7 | ||||
-rwxr-xr-x | 1_makerootfs.sh | 7 | ||||
-rwxr-xr-x | 2_install.sh | 7 | ||||
-rwxr-xr-x | 3_configure.sh | 7 | ||||
-rwxr-xr-x | 9_resync.sh | 7 | ||||
-rwxr-xr-x | chroot.sh | 5 | ||||
-rw-r--r-- | common-functions (renamed from functions) | 0 | ||||
-rw-r--r-- | common-settings | 12 | ||||
-rwxr-xr-x | mount.sh | 5 | ||||
-rwxr-xr-x | umount.sh | 5 |
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 @@ -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 @@ -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" @@ -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" |