Dropping incomplete and not really supported exposed root mode.
This might come back in future if there's demand for it and the base is sufficiently cleaned up first.
This commit is contained in:
parent
5e2758b4c0
commit
955175ac4b
|
@ -498,9 +498,6 @@ Set_defaults ()
|
|||
# Setting chroot filesystem
|
||||
LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM:-squashfs}"
|
||||
|
||||
# Setting whether to expose root filesystem as read only
|
||||
LB_EXPOSED_ROOT="${LB_EXPOSED_ROOT:-false}"
|
||||
|
||||
# Setting union filesystem
|
||||
LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-aufs}"
|
||||
|
||||
|
|
|
@ -216,8 +216,6 @@
|
|||
[\fB\-\-updates\fR true|false]
|
||||
.br
|
||||
[\fB\-\-backports\fR true|false]
|
||||
.br
|
||||
[\fB\-\-exposed\-root\fR true|false]
|
||||
.br
|
||||
[\fB\-\-verbose\fR]
|
||||
.br
|
||||
|
@ -454,8 +452,6 @@ defines what size the hdd image should be. Note that although the default is set
|
|||
defines if debian updates package archives should be included in the image or not.
|
||||
.IP "\fB\-\-backports\fR true|false" 4
|
||||
defines if debian backports package archives should be included in the image or not.
|
||||
.IP "\fB\-\-exposed\-root\fR true|false" 4
|
||||
defines whether to expose the root filesystem as read only and not covered by the union filesystem. This has useful implications for certain speciality setups such as LTSP. By default, this option is false.
|
||||
.IP "\fB\-\-verbose\fR" 4
|
||||
increases the verbosity of messages output by \fBlb build\fR.
|
||||
.IP "\fB\-\-win32\-loader true|false" 4
|
||||
|
|
|
@ -175,11 +175,6 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${LB_EXPOSED_ROOT}" != "false" ]
|
||||
then
|
||||
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} exposedroot"
|
||||
fi
|
||||
|
||||
LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
|
||||
|
||||
# Assembling kernel configuration
|
||||
|
|
|
@ -149,11 +149,6 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${LB_EXPOSED_ROOT}" != "false" ]
|
||||
then
|
||||
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} exposedroot"
|
||||
fi
|
||||
|
||||
LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
|
||||
|
||||
# Assembling kernel configuration
|
||||
|
|
|
@ -126,47 +126,6 @@ then
|
|||
touch chroot/etc/fstab
|
||||
fi
|
||||
|
||||
if [ "${LB_EXPOSED_ROOT}" = "true" ]
|
||||
then
|
||||
# Make sure RW dirs exist so that the initramfs script has
|
||||
# a directory in which to bind the tmpfs filesystems
|
||||
COW_DIRECTORIES="/home /live /tmp /var/lib/live /var/lock /var/log /var/run /var/tmp /var/spool"
|
||||
|
||||
for DIRECTORY in ${COW_DIRECTORIES}
|
||||
do
|
||||
mkdir -p chroot/"${DIRECTORY}"
|
||||
done
|
||||
|
||||
# Config files which need to be RW
|
||||
COW_FILES="/etc/adjtime /etc/fstab /etc/hostname /etc/hosts /etc/live.conf /etc/network/interfaces /etc/resolv.conf /etc/udev/rules.d/*persistent-net.rules /etc/udev/rules.d/*persistent-cd.rules /etc/X11/xorg.conf"
|
||||
|
||||
# Where we will store RW config files
|
||||
RW_DIRECTORY="/var/lib/live"
|
||||
|
||||
for FILE in ${COW_FILES}
|
||||
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
|
||||
mkdir -p chroot/${DIRECTORY}
|
||||
touch chroot/${DIRECTORY}/${FILE}
|
||||
|
||||
# Move files to the read-write directory
|
||||
mkdir -p chroot/${RW_DIRECTORY}/${DIRECTORY}
|
||||
mv chroot/${DIRECTORY}/${FILE} chroot/${RW_DIRECTORY}/${DIRECTORY}
|
||||
|
||||
# Create a symbolic link to RW config file
|
||||
ln -s ${RELATIVE_PATH}/${RW_DIRECTORY}/${DIRECTORY}/${FILE} chroot/${DIRECTORY}/${FILE}
|
||||
done
|
||||
|
||||
# Mount doesn't write to a symlink so use /proc/mounts instead,
|
||||
# see debian bug #154438 for more info
|
||||
rm -f chroot/etc/mtab
|
||||
ln -s /proc/mounts chroot/etc/mtab
|
||||
fi
|
||||
|
||||
if [ "${LB_SWAP_FILE_PATH}" ]; then
|
||||
dd if=/dev/zero of="chroot/${LB_SWAP_FILE_PATH}" bs=1024k count="${LB_SWAP_FILE_SIZE}"
|
||||
mkswap "chroot/${LB_SWAP_FILE_PATH}"
|
||||
|
|
|
@ -83,8 +83,7 @@ EOF
|
|||
# Restore hosts file
|
||||
mv chroot/etc/hosts.orig chroot/etc/hosts
|
||||
else
|
||||
# Blank out hosts file, don't remove in case
|
||||
# its a symlink, as in the case of exposedroot mode
|
||||
# Blank out hosts file, don't remove in case its a symlink
|
||||
Truncate chroot/etc/hosts
|
||||
fi
|
||||
|
||||
|
|
|
@ -118,7 +118,6 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
|
|||
\t [--templates PATH]\n\
|
||||
\t [--updates true|false]\n\
|
||||
\t [--backports true|false]\n\
|
||||
\t [--exposed-root true|false]\n\
|
||||
\t [--verbose]\n\
|
||||
\t [--loadlin true|false]\n\
|
||||
\t [--win32-loader true|false]\n\
|
||||
|
@ -138,7 +137,7 @@ Local_arguments ()
|
|||
parent-mirror-binary-security:,parent-mirror-debian-installer:,
|
||||
mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,
|
||||
mirror-binary-security:,mirror-debian-installer:,
|
||||
archive-areas:,parent-archive-areas:,chroot-filesystem:,exposed-root:,
|
||||
archive-areas:,parent-archive-areas:,chroot-filesystem:,
|
||||
gzip-options:,hooks:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:,
|
||||
security:,updates:,backports:,binary-filesystem:,binary-images:,
|
||||
apt-indices:,bootappend-install:,bootappend-live:,bootappend-live-failsafe:,bootloader:,checksums:,compression:,config:,zsync:,build-with-chroot:,
|
||||
|
@ -439,11 +438,6 @@ Local_arguments ()
|
|||
shift 2
|
||||
;;
|
||||
|
||||
--exposed-root)
|
||||
LB_EXPOSED_ROOT="${2}"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--gzip-options)
|
||||
GZIP_OPTIONS="${2}"
|
||||
shift 2
|
||||
|
@ -1133,10 +1127,6 @@ LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}"
|
|||
# (Default: ${LB_UNION_FILESYSTEM})
|
||||
LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM}"
|
||||
|
||||
# \$LB_EXPOSED_ROOT: expose root as read only
|
||||
# (Default: ${LB_EXPOSED_ROOT})
|
||||
LB_EXPOSED_ROOT="${LB_EXPOSED_ROOT}"
|
||||
|
||||
# \$LB_HOOKS: set hook commands
|
||||
# (Default: empty)
|
||||
LB_HOOKS="${LB_HOOKS}"
|
||||
|
|
Loading…
Reference in New Issue