added support for custom modification
This commit is contained in:
parent
6679b00bcd
commit
e4aee9a876
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
@ -26,6 +26,7 @@ BASE_PACKAGES="alpine-base tzdata parted ifupdown e2fsprogs-extra util-linux cor
|
|||||||
|
|
||||||
WORK_PATH="/work"
|
WORK_PATH="/work"
|
||||||
OUTPUT_PATH="/output"
|
OUTPUT_PATH="/output"
|
||||||
|
INPUT_PATH="/input"
|
||||||
ROOTFS_PATH="${WORK_PATH}/root_fs"
|
ROOTFS_PATH="${WORK_PATH}/root_fs"
|
||||||
BOOTFS_PATH="${WORK_PATH}/boot_fs"
|
BOOTFS_PATH="${WORK_PATH}/boot_fs"
|
||||||
DATAFS_PATH="${WORK_PATH}/data_fs"
|
DATAFS_PATH="${WORK_PATH}/data_fs"
|
||||||
@ -172,12 +173,6 @@ ln -s /data/etc/dropbear/ ${ROOTFS_PATH}/etc/dropbear
|
|||||||
mv ${ROOTFS_PATH}/etc/conf.d/dropbear ${ROOTFS_PATH}/etc/conf.d/dropbear_org
|
mv ${ROOTFS_PATH}/etc/conf.d/dropbear ${ROOTFS_PATH}/etc/conf.d/dropbear_org
|
||||||
ln -s /data/etc/dropbear/dropbear.conf ${ROOTFS_PATH}/etc/conf.d/dropbear
|
ln -s /data/etc/dropbear/dropbear.conf ${ROOTFS_PATH}/etc/conf.d/dropbear
|
||||||
|
|
||||||
# cleanup
|
|
||||||
rm -rf ${ROOTFS_PATH}/var/cache/apk/*
|
|
||||||
rm -rf ${ROOTFS_PATH}/boot/initramfs*
|
|
||||||
rm -rf ${ROOTFS_PATH}/boot/System*
|
|
||||||
rm -rf ${ROOTFS_PATH}/boot/config*
|
|
||||||
|
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
echo ">> Move persistent data to /data"
|
echo ">> Move persistent data to /data"
|
||||||
|
|
||||||
@ -328,6 +323,22 @@ EOF
|
|||||||
echo ">> Configure data FS"
|
echo ">> Configure data FS"
|
||||||
mkdir -p ${DATAFS_PATH}
|
mkdir -p ${DATAFS_PATH}
|
||||||
|
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
# Custom modification
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
if [ -f ${INPUT_PATH}/image.sh ]; then
|
||||||
|
. ${INPUT_PATH}/image.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
# Cleanup
|
||||||
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
rm -rf ${ROOTFS_PATH}/var/cache/apk/*
|
||||||
|
rm -rf ${ROOTFS_PATH}/boot/initramfs*
|
||||||
|
rm -rf ${ROOTFS_PATH}/boot/System*
|
||||||
|
rm -rf ${ROOTFS_PATH}/boot/config*
|
||||||
|
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
# create image
|
# create image
|
||||||
|
Loading…
Reference in New Issue
Block a user