From 4625eace6bbacd1161d0f2b4b99cf61468963269 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 23 Nov 2023 17:13:37 -0100 Subject: [PATCH] add new scripts to be used by debian installer --- pepscripts/07grub-config | 31 +++++++++++++++++++++++++++++ pepscripts/07rebuild-icon-caches | 11 ++++++++++ pepscriptsdev/07grub-config | 31 +++++++++++++++++++++++++++++ pepscriptsdev/07rebuild-icon-caches | 11 ++++++++++ 4 files changed, 84 insertions(+) create mode 100755 pepscripts/07grub-config create mode 100755 pepscripts/07rebuild-icon-caches create mode 100755 pepscriptsdev/07grub-config create mode 100755 pepscriptsdev/07rebuild-icon-caches diff --git a/pepscripts/07grub-config b/pepscripts/07grub-config new file mode 100755 index 0000000..ec3902c --- /dev/null +++ b/pepscripts/07grub-config @@ -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 diff --git a/pepscripts/07rebuild-icon-caches b/pepscripts/07rebuild-icon-caches new file mode 100755 index 0000000..8c3c5b3 --- /dev/null +++ b/pepscripts/07rebuild-icon-caches @@ -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 {} \; + diff --git a/pepscriptsdev/07grub-config b/pepscriptsdev/07grub-config new file mode 100755 index 0000000..ec3902c --- /dev/null +++ b/pepscriptsdev/07grub-config @@ -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 diff --git a/pepscriptsdev/07rebuild-icon-caches b/pepscriptsdev/07rebuild-icon-caches new file mode 100755 index 0000000..8c3c5b3 --- /dev/null +++ b/pepscriptsdev/07rebuild-icon-caches @@ -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 {} \; +