Fixing some coding style issues.
This commit is contained in:
parent
1d728dcb3e
commit
8635931e79
|
@ -100,7 +100,7 @@ ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot
|
||||||
if [ -f config/binary_rootfs/exclude ]
|
if [ -f config/binary_rootfs/exclude ]
|
||||||
then
|
then
|
||||||
# Read exclude file and expand wildcards.
|
# Read exclude file and expand wildcards.
|
||||||
for EXCLUDE in `cat config/binary_rootfs/exclude`
|
for EXCLUDE in $(cat config/binary_rootfs/exclude)
|
||||||
do
|
do
|
||||||
if [ -e chroot/chroot/"${EXCLUDE}" ]
|
if [ -e chroot/chroot/"${EXCLUDE}" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -79,7 +79,7 @@ Utf8_to_latin1 ()
|
||||||
Syslinux_memtest_entry ()
|
Syslinux_memtest_entry ()
|
||||||
{
|
{
|
||||||
LABEL="${1}"
|
LABEL="${1}"
|
||||||
MENULABEL=`Utf8_to_latin1 "${2}"`
|
MENULABEL="$(Utf8_to_latin1 "${2}")"
|
||||||
KERNEL="${3}"
|
KERNEL="${3}"
|
||||||
|
|
||||||
MEMTEST="${MEMTEST}\nLABEL ${LABEL}\n"
|
MEMTEST="${MEMTEST}\nLABEL ${LABEL}\n"
|
||||||
|
@ -92,7 +92,7 @@ Syslinux_memtest_entry ()
|
||||||
Syslinux_live_entry ()
|
Syslinux_live_entry ()
|
||||||
{
|
{
|
||||||
LABEL="${1}"
|
LABEL="${1}"
|
||||||
MENULABEL=`Utf8_to_latin1 "${2}"`
|
MENULABEL="$(Utf8_to_latin1 "${2}")"
|
||||||
MENULABEL="${2}"
|
MENULABEL="${2}"
|
||||||
KERNEL="${3}"
|
KERNEL="${3}"
|
||||||
INITRD="${4}"
|
INITRD="${4}"
|
||||||
|
@ -233,7 +233,7 @@ Copy_syslinux_templates ()
|
||||||
else
|
else
|
||||||
rm -f ${SCREEN_PATH}/splash.rle
|
rm -f ${SCREEN_PATH}/splash.rle
|
||||||
rm -f ${DATA_PATH}/splash.png
|
rm -f ${DATA_PATH}/splash.png
|
||||||
cp -f "${LH_SYSLINUX_SPLASH}" ${DATA_PATH}/`basename ${SPLASH}`
|
cp -f "${LH_SYSLINUX_SPLASH}" ${DATA_PATH}/$(basename ${SPLASH})
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -119,33 +119,35 @@ if [ "${LH_EXPOSED_ROOT}" = "enabled" ]
|
||||||
then
|
then
|
||||||
# Make sure RW dirs exist so that the initramfs script has
|
# Make sure RW dirs exist so that the initramfs script has
|
||||||
# a directory in which to bind the tmpfs filesystems
|
# a directory in which to bind the tmpfs filesystems
|
||||||
COW_DIRS='/tmp /var/tmp /var/lock /var/run /var/lib/live /var/log
|
COW_DIRECTORIES="/home /live /tmp /var/lib/live /var/lock /var/log /var/run /var/tmp /var/spool"
|
||||||
/var/spool /home /live'
|
|
||||||
for DIR in ${COW_DIRS}; do
|
for DIRECTORY in ${COW_DIRECTORIES}
|
||||||
mkdir -p chroot${DIR}
|
do
|
||||||
|
mkdir -p chroot/"${DIRECTORY}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Config files which need to be RW
|
# Config files which need to be RW
|
||||||
CONFIG_FILES='/etc/hostname /etc/hosts /etc/resolv.conf /etc/fstab
|
COW_FILES="/etc/adjtime /etc/fstab /etc/hostname /etc/hosts /etc/live.conf /etc/network/interfaces /etc/resolv.conf /etc/udev/rules.d/z25_persistent-net.rules /etc/udev/rules.d/z25_persistent-cd.rules' /etc/X11/xorg.conf"
|
||||||
/etc/live.conf /etc/network/interfaces /etc/X11/xorg.conf /etc/adjtime
|
|
||||||
/etc/udev/rules.d/z25_persistent-net.rules
|
|
||||||
/etc/udev/rules.d/z25_persistent-cd.rules'
|
|
||||||
|
|
||||||
# Where we will store RW config files
|
# Where we will store RW config files
|
||||||
RW_DIR='/var/lib/live'
|
RW_DIRECTORY="/var/lib/live"
|
||||||
|
|
||||||
for FILE_PATH in ${CONFIG_FILES}
|
for FILE in ${COW_FILES}
|
||||||
do
|
do
|
||||||
|
DIRECTORY="$(dirname ${FILE})"
|
||||||
|
FILE="$(basename ${FILE})"
|
||||||
|
RELATIVE_PATH="$(echo ${DIRECTORY} | sed 's/[^\/]\+/../g; s/^\///g')"
|
||||||
|
|
||||||
# Touch files in case they don't yet exist
|
# Touch files in case they don't yet exist
|
||||||
FILE_DIR=$(dirname ${FILE_PATH})
|
mkdir -p chroot/${DIRECTORY}
|
||||||
mkdir -p chroot${FILE_DIR}
|
touch chroot/${DIRECTORY}/${FILE}
|
||||||
touch chroot${FILE_PATH}
|
|
||||||
FILE_NAME=$(basename ${FILE_PATH})
|
# Move files to the read-write directory
|
||||||
mkdir -p chroot${RW_DIR}${FILE_DIR}
|
mkdir -p chroot/${RW_DIRECTORY}/${DIRECTORY}
|
||||||
mv chroot${FILE_PATH} chroot${RW_DIR}${FILE_DIR}
|
mv chroot/${DIRECTORY}/${FILE} chroot/${RW_DIRECTORY}/${DIRECTORY}
|
||||||
|
|
||||||
# Create a symbolic link to RW config file
|
# Create a symbolic link to RW config file
|
||||||
RELATIVE_PATH=$(echo ${FILE_DIR}|sed 's/[^\/]\+/../g; s/^\///g')
|
ln -s ${RELATIVE_PATH}/${RW_DIRECTORY}/${DIRECTORY}/${FILE} chroot/${DIRECTORY}/${FILE}
|
||||||
ln -s ${RELATIVE_PATH}${RW_DIR}${FILE_PATH} chroot${FILE_PATH}
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Mount doesn't write to a symlink so use /proc/mounts instead,
|
# Mount doesn't write to a symlink so use /proc/mounts instead,
|
||||||
|
|
Loading…
Reference in New Issue