|
|
@ -502,7 +502,7 @@ function build_bootstrap() { |
|
|
|
setup_host |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
debootstrap --arch=$DISTRIBUTION_ARCH --variant=$DISTRIBUTION_VARIANT $DISTRIBUTION $BUILD_DIR $DISTRIBUTION_URL >>$OUTPUT 2>>$OUTPUT |
|
|
|
} |
|
|
@ -998,140 +998,65 @@ EOF |
|
|
|
|
|
|
|
function prereq_pkg_list() { |
|
|
|
echo -e "${YELLOW}=====> installing prerequested software for chroot system ...${ENDCOLOUR}" |
|
|
|
if [ $DEBIAN_FRONTEND_TYPE = "noninteractive" ]; then |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/prereq.list ]; then |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD upgrade $APT_OPTIONS >>$OUTPUT 2>&1 && |
|
|
|
echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/prereq.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
else |
|
|
|
# we need to install systemd first, to configure machine id |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD upgrade $APT_OPTIONS >dev/null && |
|
|
|
echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD install $APT_OPTIONS sudo libterm-readline-gnu-perl systemd-sysv >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
elif [ $DEBIAN_FRONTEND_TYPE = "dialog" ]; then |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/prereq.list ]; then |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD upgrade $APT_OPTIONS >>$OUTPUT 2>&1 && |
|
|
|
echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/prereq.list | tr "\n" " ") |
|
|
|
else |
|
|
|
# we need to install systemd first, to configure machine id |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD upgrade $APT_OPTIONS >dev/null && |
|
|
|
echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD install $APT_OPTIONS sudo libterm-readline-gnu-perl systemd-sysv |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -f $SCRIPT_DIR/pkglists/prereq.list ]; then |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
echo -e "${YELLOW}=====> upgrading chroot system ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD upgrade $APT_OPTIONS >>$OUTPUT 2>&1 && |
|
|
|
echo -e "${YELLOW}=====> installing packages ...${ENDCOLOUR}" && |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/prereq.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
function main_pkg_list() { |
|
|
|
echo -e "${YELLOW}=====> installing main packages for chroot system ...${ENDCOLOUR}" |
|
|
|
if [ $DEBIAN_FRONTEND_TYPE = "noninteractive" ]; then |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/main.list ]; then |
|
|
|
|
|
|
|
if [ -f $SCRIPT_DIR/pkglists/main.list ]; then |
|
|
|
#sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
# $APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/main.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
if [ $LIVE_TYPE = "ubuntu" ]; then |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-main.list ]; then |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/main.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
else |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
$APT_CMD install $APT_OPTIONS ubuntu-minimal resolvconf xz-utils linux-image-generic >>$OUTPUT 2>&1 |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-main.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
if [ $LIVE_TYPE = "ubuntu" ]; then |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-main.list ]; then |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-main.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-gui.list ]; then |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD install $APT_OPTIONS tasksel >>$OUTPUT 2>&1 && |
|
|
|
tasksel install xubuntu-live >>$OUTPUT 2>&1 && |
|
|
|
tasksel install xubuntu-core >>$OUTPUT 2>&1 && |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-gui.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
#$APT_CMD install $APT_OPTIONS /linux-live/packages/chromium_88.0.4324.96~linuxmint1+ulyssa_amd64.deb >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list ]; then |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
elif [ $DEBIAN_FRONTEND_TYPE = "dialog" ]; then |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/main.list ]; then |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-gui.list ]; then |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/main.list | tr "\n" " ") |
|
|
|
else |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
$APT_CMD install $APT_OPTIONS ubuntu-minimal resolvconf xz-utils linux-image-generic |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-gui.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
#$APT_CMD install $APT_OPTIONS /linux-live/packages/chromium_88.0.4324.96~linuxmint1+ulyssa_amd64.deb >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
if [ $LIVE_TYPE = "ubuntu" ]; then |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-main.list ]; then |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-main.list | tr "\n" " ") |
|
|
|
fi |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-gui.list ]; then |
|
|
|
$APT_CMD install $APT_OPTIONS xubuntu-core^ ubiquity ubiquity-casper ubiquity-frontend-gtk ubiquity-slideshow-xubuntu ubiquity-ubuntu-artwork |
|
|
|
#$APT_CMD install $APT_OPTIONS \ |
|
|
|
#$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-gui.list | tr "\n" " ") |
|
|
|
#$APT_CMD install $APT_OPTIONS /linux-live/packages/chromium_88.0.4324.96~linuxmint1+ulyssa_amd64.deb |
|
|
|
fi |
|
|
|
: 'if [ -f $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list ]; then |
|
|
|
echo "" |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list ]; then |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list | tr "\n" " ") |
|
|
|
fi' |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-ubiquity.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
function other_pkg_list() { |
|
|
|
echo -e "${YELLOW}=====> installing other packages for chroot system ...${ENDCOLOUR}" |
|
|
|
if [ $DEBIAN_FRONTEND_TYPE = "noninteractive" ]; then |
|
|
|
if [ $LIVE_TYPE = "ubuntu" ]; then |
|
|
|
#$APT_CMD install $APT_OPTIONS tasksel >>$OUTPUT 2>&1 |
|
|
|
#tasksel install xubuntu-core |
|
|
|
#$APT_CMD autoremove $APT_OPTIONS tasksel >>$OUTPUT 2>&1 |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-other.list ]; then |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-other.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/other.list ]; then |
|
|
|
|
|
|
|
if [ $LIVE_TYPE = "ubuntu" ]; then |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-other.list ]; then |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/other.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
elif [ $DEBIAN_FRONTEND_TYPE = "dialog" ]; then |
|
|
|
if [ $LIVE_TYPE = "ubuntu" ]; then |
|
|
|
#$APT_CMD install $APT_OPTIONS tasksel >>$OUTPUT 2>&1 |
|
|
|
#tasksel install xubuntu-core |
|
|
|
#$APT_CMD autoremove $APT_OPTIONS tasksel >>$OUTPUT 2>&1 |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/ubuntu-other.list ]; then |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-other.list | tr "\n" " ") |
|
|
|
fi |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/ubuntu-other.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/other.list ]; then |
|
|
|
fi |
|
|
|
if [ -f $SCRIPT_DIR/pkglists/other.list ]; then |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD update >>$OUTPUT 2>&1 && |
|
|
|
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|
|
|
$APT_CMD install $APT_OPTIONS \ |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/other.list | tr "\n" " ") |
|
|
|
fi |
|
|
|
$(grep -vE "^\s*#" $SCRIPT_DIR/pkglists/other.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
@ -1145,6 +1070,7 @@ function chroot_pkg_install() { |
|
|
|
if [ $LIVE_TYPE = "linux-live" ]; then |
|
|
|
(cd /linux-live/rootcopy && cp --parents -afr * /) |
|
|
|
elif [ $LIVE_TYPE = "ubuntu" ]; then |
|
|
|
#echo "" |
|
|
|
(cd /linux-live/rootcopy-ubuntu && cp --parents -afr * /) |
|
|
|
fi |
|
|
|
|
|
|
@ -1191,7 +1117,9 @@ EOF |
|
|
|
echo 'LANG="ru_RU.UTF-8"' >/etc/default/locale && |
|
|
|
dpkg-reconfigure -f noninteractive locales >>$OUTPUT 2>&1 && |
|
|
|
update-locale LANG=ru_RU.UTF-8 >>$OUTPUT 2>&1 |
|
|
|
#localepurge |
|
|
|
echo "localepurge localepurge/nopurge multiselect en, en_US.UTF-8, ru, ru_RU, ru_RU.UTF-8" | debconf-set-selections |
|
|
|
dpkg-reconfigure -f noninteractive localepurge >>$OUTPUT 2>&1 |
|
|
|
localepurge -v >>$OUTPUT 2>&1 |
|
|
|
|
|
|
|
# configure resolvconf |
|
|
|
if grep resolvconf $SCRIPT_DIR/pkglists/main.list >>$OUTPUT 2>&1 || grep resolvconf $SCRIPT_DIR/pkglists/other.list || [ $DISTRIBUTION != "xenial" ] >>$OUTPUT 2>&1; then |
|
|
@ -1215,10 +1143,10 @@ EOF |
|
|
|
#dpkg-reconfigure console-setup |
|
|
|
|
|
|
|
# configure timezone and locale |
|
|
|
dpkg-reconfigure tzdata |
|
|
|
#dpkg-reconfigure tzdata |
|
|
|
dpkg-reconfigure locales |
|
|
|
#dpkg-reconfigure localepurge |
|
|
|
localepurge |
|
|
|
#localepurge -v |
|
|
|
|
|
|
|
# configure resolvconf |
|
|
|
if grep resolvconf $SCRIPT_DIR/pkglists/main.list >>$OUTPUT 2>&1 || grep resolvconf $SCRIPT_DIR/pkglists/other.list || [ $DISTRIBUTION != "xenial" ] >>$OUTPUT 2>&1; then |
|
|
@ -1378,7 +1306,7 @@ function chroot_finish_up() { |
|
|
|
rm -f /etc/ssh/ssh_host* |
|
|
|
rm -f /var/backups/* >>$OUTPUT 2>&1 |
|
|
|
rm -f /var/cache/ldconfig/* >>$OUTPUT 2>&1 |
|
|
|
rm -f /var/cache/debconf/* >>$OUTPUT 2>&1 |
|
|
|
#rm -f /var/cache/debconf/* >>$OUTPUT 2>&1 |
|
|
|
rm -f /var/cache/fontconfig/* >>$OUTPUT 2>&1 |
|
|
|
rm -f /var/cache/apt/archives/*.deb >>$OUTPUT 2>&1 |
|
|
|
rm -f /var/cache/apt/*.bin >>$OUTPUT 2>&1 |
|
|
@ -1389,7 +1317,4 @@ function chroot_finish_up() { |
|
|
|
rm -f /var/lib/apt/lists/*InRelease >>$OUTPUT 2>&1 |
|
|
|
rm -f /var/lib/apt/lists/deb.* >>$OUTPUT 2>&1 |
|
|
|
rm -f /var/lib/dpkg/*-old >>$OUTPUT 2>&1 |
|
|
|
} |
|
|
|
if [ grep ]; then |
|
|
|
echo |
|
|
|
fi |
|
|
|
} |