Cleaned up the scripts a little and disabled umask (seems to break stuff on deb based distros, giving up for now)
This commit is contained in:
parent
f94d38d985
commit
58b1b79573
|
|
@ -86,18 +86,7 @@ function load_config() {
|
||||||
if [[ -f "$SCRIPT_DIR/config.sh" ]]; then
|
if [[ -f "$SCRIPT_DIR/config.sh" ]]; then
|
||||||
. "$SCRIPT_DIR/config.sh"
|
. "$SCRIPT_DIR/config.sh"
|
||||||
else
|
else
|
||||||
>&2 echo "Unable to find default config file $SCRIPT_DIR/default_config.sh, aborting."
|
>&2 echo "Unable to find default config file $SCRIPT_DIR/config.sh, aborting."
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Verify that necessary configuration values are set and they are valid
|
|
||||||
function check_config() {
|
|
||||||
local expected_config_version
|
|
||||||
expected_config_version="0.4"
|
|
||||||
|
|
||||||
if [[ "$CONFIG_FILE_VERSION" != "$expected_config_version" ]]; then
|
|
||||||
>&2 echo "Invalid or old config version $CONFIG_FILE_VERSION, expected $expected_config_version. Please update your configuration file from the default."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
@ -210,7 +199,6 @@ function build_iso() {
|
||||||
cd $SCRIPT_DIR
|
cd $SCRIPT_DIR
|
||||||
|
|
||||||
load_config
|
load_config
|
||||||
check_config
|
|
||||||
check_host
|
check_host
|
||||||
|
|
||||||
# check number of args
|
# check number of args
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,19 @@ function add_mullvad_browser()
|
||||||
apt install -y mullvad-browser
|
apt install -y mullvad-browser
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restore_firefox() {
|
||||||
|
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- > /etc/apt/keyrings/packages.mozilla.org.asc
|
||||||
|
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" > /etc/apt/sources.list.d/mozilla.list
|
||||||
|
echo '
|
||||||
|
Package: *
|
||||||
|
Pin: origin packages.mozilla.org
|
||||||
|
Pin-Priority: 1000
|
||||||
|
' > /etc/apt/preferences.d/mozilla
|
||||||
|
apt update
|
||||||
|
apt install firefox -y
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function remove_snaps() {
|
function remove_snaps() {
|
||||||
while [ "$(snap list | wc -l)" -gt 0 ]; do
|
while [ "$(snap list | wc -l)" -gt 0 ]; do
|
||||||
for snap in $(snap list | tail -n +2 | cut -d ' ' -f 1); do
|
for snap in $(snap list | tail -n +2 | cut -d ' ' -f 1); do
|
||||||
|
|
@ -187,11 +200,6 @@ function install_debs()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function harden_umask()
|
|
||||||
{
|
|
||||||
sed -i 's/^HOME_MODE.*/HOME_MODE\t0700/g' /etc/login.defs
|
|
||||||
}
|
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
rm -rf /tmp/* ~/.bash_history
|
rm -rf /tmp/* ~/.bash_history
|
||||||
export HISTSIZE=0
|
export HISTSIZE=0
|
||||||
|
|
@ -207,17 +215,14 @@ function customize_image() {
|
||||||
add_flatpak
|
add_flatpak
|
||||||
add_brave
|
add_brave
|
||||||
add_signal
|
add_signal
|
||||||
|
restore_firefox
|
||||||
#add_mullvad_browser
|
#add_mullvad_browser
|
||||||
install_debs
|
install_debs
|
||||||
#disable_cups
|
disable_cups
|
||||||
disable_avahi
|
disable_avahi
|
||||||
install_firewall
|
install_firewall
|
||||||
remove_packages
|
remove_packages
|
||||||
harden_umask
|
|
||||||
branding
|
branding
|
||||||
cleanup
|
cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
# Used to version the configuration. If breaking changes occur, manual
|
|
||||||
# updates to this file from the default may be necessary.
|
|
||||||
export CONFIG_FILE_VERSION="0.4"
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue