add cleanup hook to the server builds
This commit is contained in:
parent
c6256b4897
commit
0a2627b610
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# setup a folder structure
|
||||||
|
mkdir -p /target/etc/skel/.local/share/pmostools
|
||||||
|
mkdir -p /target/etc/skel/.config/autostart
|
||||||
|
mkdir -p /target/opt/pepconf
|
||||||
|
mkdir -p /target/opt/pypep/dbpep
|
||||||
|
mkdir -p /target/etc/default
|
||||||
|
mkdir -p /target/etc/apt/sources.list.d
|
||||||
|
mkdir -p /target/etc/apt
|
||||||
|
mkdir -p /target/etc/apt/trusted.gpg.d
|
||||||
|
mkdir -p /target/usr/share/keyrings
|
||||||
|
mkdir -p /target/usr/share/applications
|
||||||
|
mkdir -p /target/opt/pepconf
|
||||||
|
mkdir -p /target/opt/pypep/dbpep
|
||||||
|
mkdir -p /target/usr/share/polkit-1/actions
|
||||||
|
mkdir -p /target/usr/share/pixmaps
|
||||||
|
mkdir -p /target/etc/lightdm
|
||||||
|
mkdir -p /target/usr/lib/python3/dist-packages
|
||||||
|
mkdir -p /target/boot/grub
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
cp /preseed/grub/grub /target/etc/default
|
||||||
|
cp /preseed/repos/multimedia.list /target/etc/apt/sources.list.d
|
||||||
|
cp /preseed/repos/peppermint.list /target/etc/apt/sources.list.d
|
||||||
|
cp /preseed/repos/sources.list /target/etc/apt
|
||||||
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/etc/apt/trusted.gpg.d
|
||||||
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/etc/apt/trusted.gpg.d
|
||||||
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/usr/share/keyrings
|
||||||
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/usr/share/keyrings
|
||||||
|
cp /preseed/apps/* /target/usr/share/applications
|
||||||
|
cp /preseed/conf/* /target/opt/pepconf
|
||||||
|
cp /preseed/database/* /target/opt/pypep/dbpep
|
||||||
|
cp /preseed/polkit/* /target/usr/share/polkit-1/actions
|
||||||
|
cp /preseed/pixmaps/* /target/usr/share/pixmaps
|
||||||
|
cp /preseed/lightdm/* /target/etc/lightdm
|
||||||
|
cp /preseed/autostart/* /target/etc/skel/.config/autostart
|
||||||
|
|
||||||
|
# Copy recursive files and sub-directories
|
||||||
|
cp -r /preseed/grub/themes /target/boot/grub
|
||||||
|
cp -r /preseed/protools/* /target/usr/local/bin
|
||||||
|
cp -r /preseed/py/* /target/usr/lib/python3/dist-packages
|
||||||
|
cp -r /preseed/tools/* /target/etc/skel/.local/share/pmostools
|
||||||
|
|
||||||
|
# Run a commands in the chroot
|
||||||
|
cd /target/usr/share/python-apt/templates/
|
||||||
|
ln -s Debian.info Peppermint.info
|
||||||
|
ln -s Debian.mirrors Peppermint.mirrors
|
||||||
|
cd /target/usr/share/distro-info/
|
||||||
|
ln -s debian.csv peppermint.csv
|
||||||
|
cd /target/usr/share/
|
||||||
|
ln -s icons pepicons
|
||||||
|
ln -s themes pepthemes
|
||||||
|
ln -s backgrounds pepwallpaper
|
||||||
|
chmod 777 pepicons
|
||||||
|
chmod 777 pepthemes
|
||||||
|
chmod 777 pepwallpaper
|
||||||
|
|
||||||
|
# update gub and initramfs
|
||||||
|
chroot /target update-initramfs -u
|
||||||
|
chroot /target update-grub
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# install hblock
|
||||||
|
|
||||||
|
chroot /target curl -o /tmp/hblock 'https://raw.githubusercontent.com/hectorm/hblock/v3.4.2/hblock'
|
||||||
|
chroot /target mv /tmp/hblock /usr/local/bin/hblock
|
||||||
|
chroot /target chown 0:0 /usr/local/bin/hblock
|
||||||
|
chroot /target chmod 755 /usr/local/bin/hblock
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Workaround for using snapd on debian. Thank You - @stevesveryown and peppermint team..
|
||||||
|
cd /target
|
||||||
|
[ ! -e /etc/skel/.local/share ] && mkdir -p /etc/skel/.local/share
|
||||||
|
[ ! -e /var/lib/snapd/desktop/applications ] &&
|
||||||
|
mkdir -p /var/lib/snapd/desktop/applications &&
|
||||||
|
chmod 777 /var/lib/snapd/desktop/applications
|
||||||
|
ln -s /var/lib/snapd/desktop/applications /etc/skel/.local/share/applications
|
||||||
|
ln -s snap /usr/bin/snap-store
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script removes unwanted software and files after Debian installation.
|
||||||
|
|
||||||
|
# Remove unwanted packages
|
||||||
|
chroot /target apt purge --autoremove -y \
|
||||||
|
quassel \
|
||||||
|
thunderbird \
|
||||||
|
mpv \
|
||||||
|
smtube \
|
||||||
|
smplayer \
|
||||||
|
audacious \
|
||||||
|
connman \
|
||||||
|
deluge \
|
||||||
|
galculator \
|
||||||
|
imagemagick \
|
||||||
|
imagemagick-6-common \
|
||||||
|
xterm
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
#
|
||||||
|
#This script rebuilds the icon caches after Debian installation.
|
||||||
|
|
||||||
|
# Rebuild the icon caches
|
||||||
|
chroot /target find /usr/share/icons -type d -exec gtk-update-icon-cache -f {} \;
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# setup a folder structure
|
||||||
|
mkdir -p /target/etc/skel/.local/share/pmostools
|
||||||
|
mkdir -p /target/etc/skel/.config/autostart
|
||||||
|
mkdir -p /target/opt/pepconf
|
||||||
|
mkdir -p /target/opt/pypep/dbpep
|
||||||
|
mkdir -p /target/etc/default
|
||||||
|
mkdir -p /target/etc/apt/sources.list.d
|
||||||
|
mkdir -p /target/etc/apt
|
||||||
|
mkdir -p /target/etc/apt/trusted.gpg.d
|
||||||
|
mkdir -p /target/usr/share/keyrings
|
||||||
|
mkdir -p /target/usr/share/applications
|
||||||
|
mkdir -p /target/opt/pepconf
|
||||||
|
mkdir -p /target/opt/pypep/dbpep
|
||||||
|
mkdir -p /target/usr/share/polkit-1/actions
|
||||||
|
mkdir -p /target/usr/share/pixmaps
|
||||||
|
mkdir -p /target/etc/lightdm
|
||||||
|
mkdir -p /target/usr/lib/python3/dist-packages
|
||||||
|
mkdir -p /target/boot/grub
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
cp /preseed/grub/grub /target/etc/default
|
||||||
|
cp /preseed/repos/multimedia.list /target/etc/apt/sources.list.d
|
||||||
|
cp /preseed/repos/peppermint.list /target/etc/apt/sources.list.d
|
||||||
|
cp /preseed/repos/sources.list /target/etc/apt
|
||||||
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/etc/apt/trusted.gpg.d
|
||||||
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/etc/apt/trusted.gpg.d
|
||||||
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/usr/share/keyrings
|
||||||
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/usr/share/keyrings
|
||||||
|
cp /preseed/apps/* /target/usr/share/applications
|
||||||
|
cp /preseed/conf/* /target/opt/pepconf
|
||||||
|
cp /preseed/database/* /target/opt/pypep/dbpep
|
||||||
|
cp /preseed/polkit/* /target/usr/share/polkit-1/actions
|
||||||
|
cp /preseed/pixmaps/* /target/usr/share/pixmaps
|
||||||
|
cp /preseed/lightdm/* /target/etc/lightdm
|
||||||
|
cp /preseed/autostart/* /target/etc/skel/.config/autostart
|
||||||
|
|
||||||
|
# Copy recursive files and sub-directories
|
||||||
|
cp -r /preseed/grub/themes /target/boot/grub
|
||||||
|
cp -r /preseed/protools/* /target/usr/local/bin
|
||||||
|
cp -r /preseed/py/* /target/usr/lib/python3/dist-packages
|
||||||
|
cp -r /preseed/tools/* /target/etc/skel/.local/share/pmostools
|
||||||
|
|
||||||
|
# Run a commands in the chroot
|
||||||
|
cd /target/usr/share/python-apt/templates/
|
||||||
|
ln -s Debian.info Peppermint.info
|
||||||
|
ln -s Debian.mirrors Peppermint.mirrors
|
||||||
|
cd /target/usr/share/distro-info/
|
||||||
|
ln -s debian.csv peppermint.csv
|
||||||
|
cd /target/usr/share/
|
||||||
|
ln -s icons pepicons
|
||||||
|
ln -s themes pepthemes
|
||||||
|
ln -s backgrounds pepwallpaper
|
||||||
|
chmod 777 pepicons
|
||||||
|
chmod 777 pepthemes
|
||||||
|
chmod 777 pepwallpaper
|
||||||
|
|
||||||
|
# update gub and initramfs
|
||||||
|
chroot /target update-initramfs -u
|
||||||
|
chroot /target update-grub
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# install hblock
|
||||||
|
|
||||||
|
chroot /target curl -o /tmp/hblock 'https://raw.githubusercontent.com/hectorm/hblock/v3.4.2/hblock'
|
||||||
|
chroot /target mv /tmp/hblock /usr/local/bin/hblock
|
||||||
|
chroot /target chown 0:0 /usr/local/bin/hblock
|
||||||
|
chroot /target chmod 755 /usr/local/bin/hblock
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Workaround for using snapd on debian. Thank You - @stevesveryown and peppermint team..
|
||||||
|
cd /target
|
||||||
|
[ ! -e /etc/skel/.local/share ] && mkdir -p /etc/skel/.local/share
|
||||||
|
[ ! -e /var/lib/snapd/desktop/applications ] &&
|
||||||
|
mkdir -p /var/lib/snapd/desktop/applications &&
|
||||||
|
chmod 777 /var/lib/snapd/desktop/applications
|
||||||
|
ln -s /var/lib/snapd/desktop/applications /etc/skel/.local/share/applications
|
||||||
|
ln -s snap /usr/bin/snap-store
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script removes unwanted software and files after Debian installation.
|
||||||
|
|
||||||
|
# Remove unwanted packages
|
||||||
|
chroot /target apt purge --autoremove -y \
|
||||||
|
quassel \
|
||||||
|
thunderbird \
|
||||||
|
mpv \
|
||||||
|
smtube \
|
||||||
|
smplayer \
|
||||||
|
audacious \
|
||||||
|
connman \
|
||||||
|
deluge \
|
||||||
|
galculator \
|
||||||
|
imagemagick \
|
||||||
|
imagemagick-6-common \
|
||||||
|
xterm
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
#
|
||||||
|
#This script rebuilds the icon caches after Debian installation.
|
||||||
|
|
||||||
|
# Rebuild the icon caches
|
||||||
|
chroot /target find /usr/share/icons -type d -exec gtk-update-icon-cache -f {} \;
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
echo "Copying files to chroot..."
|
||||||
|
cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
chroot /cdrom update-initramfs -u
|
||||||
|
chroot /cdrom update-grub
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
#echo "Copying files to chroot..."
|
||||||
|
#cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
#chroot /cdrom update-initramfs -u
|
||||||
|
#chroot /cdrom update-grub
|
||||||
|
|
||||||
|
#exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# setup a folder structure
|
||||||
|
mkdir -p /target/etc/skel/.local/share/pmostools
|
||||||
|
mkdir -p /target/etc/skel/.config/autostart
|
||||||
|
mkdir -p /target/opt/pepconf
|
||||||
|
mkdir -p /target/opt/pypep/dbpep
|
||||||
|
mkdir -p /target/etc/default
|
||||||
|
mkdir -p /target/etc/apt/sources.list.d
|
||||||
|
mkdir -p /target/etc/apt
|
||||||
|
mkdir -p /target/etc/apt/trusted.gpg.d
|
||||||
|
mkdir -p /target/usr/share/keyrings
|
||||||
|
mkdir -p /target/usr/share/applications
|
||||||
|
mkdir -p /target/opt/pepconf
|
||||||
|
mkdir -p /target/opt/pypep/dbpep
|
||||||
|
mkdir -p /target/usr/share/polkit-1/actions
|
||||||
|
mkdir -p /target/usr/share/pixmaps
|
||||||
|
mkdir -p /target/etc/lightdm
|
||||||
|
mkdir -p /target/usr/lib/python3/dist-packages
|
||||||
|
mkdir -p /target/boot/grub
|
||||||
|
mkdir -p /target/usr/share/python-apt/templates
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
cp /preseed/grub/grub /target/etc/default
|
||||||
|
cp /preseed/repos/multimedia.list /target/etc/apt/sources.list.d
|
||||||
|
cp /preseed/repos/peppermint.list /target/etc/apt/sources.list.d
|
||||||
|
cp /preseed/repos/sources.list /target/etc/apt
|
||||||
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/etc/apt/trusted.gpg.d
|
||||||
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/etc/apt/trusted.gpg.d
|
||||||
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/usr/share/keyrings
|
||||||
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/usr/share/keyrings
|
||||||
|
cp /preseed/apps/* /target/usr/share/applications
|
||||||
|
cp /preseed/conf/* /target/opt/pepconf
|
||||||
|
cp /preseed/database/* /target/opt/pypep/dbpep
|
||||||
|
cp /preseed/polkit/* /target/usr/share/polkit-1/actions
|
||||||
|
cp /preseed/pixmaps/* /target/usr/share/pixmaps
|
||||||
|
cp /preseed/lightdm/* /target/etc/lightdm
|
||||||
|
cp /preseed/autostart/* /target/etc/skel/.config/autostart
|
||||||
|
cp /preseed/info/* /target/usr/share/python-apt/templates
|
||||||
|
|
||||||
|
# Copy recursive files and sub-directories
|
||||||
|
cp -r /preseed/grub/themes /target/boot/grub
|
||||||
|
cp -r /preseed/protools/* /target/usr/local/bin
|
||||||
|
cp -r /preseed/py/* /target/usr/lib/python3/dist-packages
|
||||||
|
cp -r /preseed/tools/* /target/etc/skel/.local/share/pmostools
|
||||||
|
|
||||||
|
# Run a commands in the chroot
|
||||||
|
cd /target/usr/share/python-apt/templates/
|
||||||
|
ln -s Devuan.info Peppermint.info
|
||||||
|
ln -s Devuan.mirrors Peppermint.mirrors
|
||||||
|
cd /target/usr/share/distro-info/
|
||||||
|
ln -s devuan.csv peppermint.csv
|
||||||
|
cd /target/usr/share/
|
||||||
|
ln -s icons pepicons
|
||||||
|
ln -s themes pepthemes
|
||||||
|
ln -s backgrounds pepwallpaper
|
||||||
|
chmod 777 pepicons
|
||||||
|
chmod 777 pepthemes
|
||||||
|
chmod 777 pepwallpaper
|
||||||
|
|
||||||
|
# update gub and initramfs
|
||||||
|
chroot /target update-initramfs -u
|
||||||
|
chroot /target update-grub
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# install hblock
|
||||||
|
|
||||||
|
chroot /target curl -o /tmp/hblock 'https://raw.githubusercontent.com/hectorm/hblock/v3.4.2/hblock'
|
||||||
|
chroot /target mv /tmp/hblock /usr/local/bin/hblock
|
||||||
|
chroot /target chown 0:0 /usr/local/bin/hblock
|
||||||
|
chroot /target chmod 755 /usr/local/bin/hblock
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script removes unwanted software and files after Debian installation.
|
||||||
|
|
||||||
|
# Remove unwanted packages
|
||||||
|
chroot /target apt purge --autoremove -y \
|
||||||
|
quassel \
|
||||||
|
thunderbird \
|
||||||
|
mpv \
|
||||||
|
smtube \
|
||||||
|
smplayer \
|
||||||
|
audacious \
|
||||||
|
connman \
|
||||||
|
deluge \
|
||||||
|
galculator \
|
||||||
|
raspi-firmware \
|
||||||
|
imagemagick \
|
||||||
|
imagemagick-6-common \
|
||||||
|
xterm
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
#
|
||||||
|
#This script rebuilds the icon caches after Debian installation.
|
||||||
|
|
||||||
|
# Rebuild the icon caches
|
||||||
|
chroot /target find /usr/share/icons -type d -exec gtk-update-icon-cache -f {} \;
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# setup a folder structure
|
||||||
|
mkdir -p /target/etc/skel/.local/share/pmostools
|
||||||
|
mkdir -p /target/etc/skel/.config/autostart
|
||||||
|
mkdir -p /target/opt/pepconf
|
||||||
|
mkdir -p /target/opt/pypep/dbpep
|
||||||
|
mkdir -p /target/etc/default
|
||||||
|
mkdir -p /target/etc/apt/sources.list.d
|
||||||
|
mkdir -p /target/etc/apt
|
||||||
|
mkdir -p /target/etc/apt/trusted.gpg.d
|
||||||
|
mkdir -p /target/usr/share/keyrings
|
||||||
|
mkdir -p /target/usr/share/applications
|
||||||
|
mkdir -p /target/opt/pepconf
|
||||||
|
mkdir -p /target/opt/pypep/dbpep
|
||||||
|
mkdir -p /target/usr/share/polkit-1/actions
|
||||||
|
mkdir -p /target/usr/share/pixmaps
|
||||||
|
mkdir -p /target/etc/lightdm
|
||||||
|
mkdir -p /target/usr/lib/python3/dist-packages
|
||||||
|
mkdir -p /target/boot/grub
|
||||||
|
mkdir -p /target/usr/share/python-apt/templates
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
cp /preseed/grub/grub /target/etc/default
|
||||||
|
cp /preseed/repos/multimedia.list /target/etc/apt/sources.list.d
|
||||||
|
cp /preseed/repos/peppermint.list /target/etc/apt/sources.list.d
|
||||||
|
cp /preseed/repos/sources.list /target/etc/apt
|
||||||
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/etc/apt/trusted.gpg.d
|
||||||
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/etc/apt/trusted.gpg.d
|
||||||
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/usr/share/keyrings
|
||||||
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/usr/share/keyrings
|
||||||
|
cp /preseed/apps/* /target/usr/share/applications
|
||||||
|
cp /preseed/conf/* /target/opt/pepconf
|
||||||
|
cp /preseed/database/* /target/opt/pypep/dbpep
|
||||||
|
cp /preseed/polkit/* /target/usr/share/polkit-1/actions
|
||||||
|
cp /preseed/pixmaps/* /target/usr/share/pixmaps
|
||||||
|
cp /preseed/lightdm/* /target/etc/lightdm
|
||||||
|
cp /preseed/autostart/* /target/etc/skel/.config/autostart
|
||||||
|
cp /preseed/info/* /target/usr/share/python-apt/templates
|
||||||
|
|
||||||
|
# Copy recursive files and sub-directories
|
||||||
|
cp -r /preseed/grub/themes /target/boot/grub
|
||||||
|
cp -r /preseed/protools/* /target/usr/local/bin
|
||||||
|
cp -r /preseed/py/* /target/usr/lib/python3/dist-packages
|
||||||
|
cp -r /preseed/tools/* /target/etc/skel/.local/share/pmostools
|
||||||
|
|
||||||
|
# Run a commands in the chroot
|
||||||
|
cd /target/usr/share/python-apt/templates/
|
||||||
|
ln -s Devuan.info Peppermint.info
|
||||||
|
ln -s Devuan.mirrors Peppermint.mirrors
|
||||||
|
cd /target/usr/share/distro-info/
|
||||||
|
ln -s devuan.csv peppermint.csv
|
||||||
|
cd /target/usr/share/
|
||||||
|
ln -s icons pepicons
|
||||||
|
ln -s themes pepthemes
|
||||||
|
ln -s backgrounds pepwallpaper
|
||||||
|
chmod 777 pepicons
|
||||||
|
chmod 777 pepthemes
|
||||||
|
chmod 777 pepwallpaper
|
||||||
|
|
||||||
|
# update gub and initramfs
|
||||||
|
chroot /target update-initramfs -u
|
||||||
|
chroot /target update-grub
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# install hblock
|
||||||
|
|
||||||
|
chroot /target curl -o /tmp/hblock 'https://raw.githubusercontent.com/hectorm/hblock/v3.4.2/hblock'
|
||||||
|
chroot /target mv /tmp/hblock /usr/local/bin/hblock
|
||||||
|
chroot /target chown 0:0 /usr/local/bin/hblock
|
||||||
|
chroot /target chmod 755 /usr/local/bin/hblock
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script removes unwanted software and files after Debian installation.
|
||||||
|
|
||||||
|
# Remove unwanted packages
|
||||||
|
chroot /target apt purge --autoremove -y \
|
||||||
|
quassel \
|
||||||
|
thunderbird \
|
||||||
|
mpv \
|
||||||
|
smtube \
|
||||||
|
smplayer \
|
||||||
|
audacious \
|
||||||
|
connman \
|
||||||
|
deluge \
|
||||||
|
galculator \
|
||||||
|
raspi-firmware \
|
||||||
|
imagemagick \
|
||||||
|
imagemagick-6-common \
|
||||||
|
xterm
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
#
|
||||||
|
#This script rebuilds the icon caches after Debian installation.
|
||||||
|
|
||||||
|
# Rebuild the icon caches
|
||||||
|
chroot /target find /usr/share/icons -type d -exec gtk-update-icon-cache -f {} \;
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppemrintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
||||||
|
|
||||||
|
# Copy files to the chroot directory
|
||||||
|
echo "Copying files to chroot..."
|
||||||
|
cp /preseed/grub/grub /cdrom/etc/default
|
||||||
|
|
||||||
|
# update grub and initramfs
|
||||||
|
chroot /cdrom update-initramfs -u
|
||||||
|
chroot /cdrom update-grub
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script configures grub defaults after Debian installation.
|
||||||
|
|
||||||
|
# Defines the variables
|
||||||
|
GRUB_DEFAULT=0
|
||||||
|
GRUB_TIMEOUT=5
|
||||||
|
GRUB_DISTRIBUTOR="Peppermint"
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||||
|
GRUB_CMDLINE_LINUX=""
|
||||||
|
GRUB_GFXMODE=1360x768
|
||||||
|
GRUB_THEME="/boot/grub/themes/peppermint/theme.txt"
|
||||||
|
GRUB_DISABLE_OS_PROBER=false
|
||||||
|
|
||||||
|
|
||||||
|
# GRUB configuration file path
|
||||||
|
GRUB_CONFIG_FILE="/target/etc/default/grub"
|
||||||
|
|
||||||
|
# Modify the GRUB file
|
||||||
|
sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE
|
||||||
|
sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE
|
||||||
|
# Add GRUB_THEME if it doesn't exist
|
||||||
|
if ! grep -q "^GRUB_THEME=" $GRUB_CONFIG_FILE; then
|
||||||
|
echo "GRUB_THEME=\"$GRUB_THEME\"" >> $GRUB_CONFIG_FILE
|
||||||
|
else
|
||||||
|
sed -i "s#^GRUB_THEME=.*#GRUB_THEME=\"$GRUB_THEME\"#" $GRUB_CONFIG_FILE
|
||||||
|
fi
|
||||||
|
sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE
|
||||||
|
|
||||||
|
# Run update-grub after modifying the file
|
||||||
|
chroot /target update-grub
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
||||||
|
|
||||||
|
# This script updates the system after Debian installation.
|
||||||
|
|
||||||
|
# Update the system
|
||||||
|
if ! chroot /target apt update; then
|
||||||
|
echo "Failed to update package lists. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Upgrade the system
|
||||||
|
if ! chroot /target apt upgrade -y; then
|
||||||
|
echo "Failed to upgrade packages. Aborting." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean up unnecessary packages
|
||||||
|
if ! chroot /target apt autoremove -y; then
|
||||||
|
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "System update completed successfully."
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue