|
|
@ -1484,7 +1484,7 @@ function chroot_finish_up() { |
|
|
|
|
|
|
|
function module_check_mounted() { |
|
|
|
echo -e "=====> the ${CYAN}${FUNCNAME[0]}${ENDCOLOUR} function is executing ..." |
|
|
|
if grep -qs "$MODULE_MERGED_DIR/dev" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/run" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/proc" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/sys" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/dev/pts" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/tmp" /proc/mounts; then |
|
|
|
if grep -qs "$MODULE_MERGED_DIR" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/dev" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/run" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/proc" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/sys" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/dev/pts" /proc/mounts || grep -qs "$MODULE_MERGED_DIR/tmp" /proc/mounts; then |
|
|
|
echo -e "${BOLD}${LIGHTYELLOW}Сhroot contains mounted filesystems.${ENDCOLOUR}" |
|
|
|
if [ "$UNATTENDED" = "1" ]; then |
|
|
|
module_chroot_umount_fs |
|
|
@ -1680,6 +1680,9 @@ function build_modules() { |
|
|
|
if [ $LIVE_TYPE = "casper" ]; then |
|
|
|
return 0 |
|
|
|
fi |
|
|
|
if [ -f /.dockerenv ] || [ "$container" = "podman" ]; then |
|
|
|
return 0 |
|
|
|
fi |
|
|
|
|
|
|
|
MODULES_DIR=$PARENT_DIR/modules |
|
|
|
|
|
|
@ -1773,6 +1776,24 @@ EOF |
|
|
|
if [ -d $MODULE_MERGED_DIR/etc/NetworkManager ]; then |
|
|
|
echo "Disable dhclient.service autostart." >>$OUTPUT 2>&1 |
|
|
|
chroot $MODULE_MERGED_DIR systemctl disable dhclient >>$OUTPUT 2>&1 |
|
|
|
mkdir -p $MODULE_MERGED_DIR/etc/netplan |
|
|
|
cat <<EOF >$MODULE_MERGED_DIR/etc/netplan/01-netcfg.yaml |
|
|
|
# This file describes the network interfaces available on your system |
|
|
|
# For more information, see netplan(5). |
|
|
|
# Set and change netplan renderer to NetworkManager GUI tool |
|
|
|
network: |
|
|
|
version: 2 |
|
|
|
renderer: NetworkManager |
|
|
|
EOF |
|
|
|
cat <<EOF >$MODULE_MERGED_DIR/etc/NetworkManager/NetworkManager.conf |
|
|
|
[main] |
|
|
|
rc-manager=resolvconf |
|
|
|
plugins=ifupdown,keyfile |
|
|
|
dns=dnsmasq |
|
|
|
[ifupdown] |
|
|
|
managed=false |
|
|
|
EOF |
|
|
|
dpkg-reconfigure network-manager |
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|