Skip to content

Commit

Permalink
revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Nov 17, 2023
1 parent b5b5402 commit 6baaaab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 deletions.
18 changes: 1 addition & 17 deletions installation/includes/02_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,8 @@ check_os_type() {
fi
}

set_optional_service_enablement() {
local service="$1"
local enablement="$2"
local option="${3:+$3 }" # optional, dont't quote in next call!

local local_sudo=
if [[ ! ${option} =~ "--user" ]]; then
local_sudo=sudo
fi

if (systemctl -all list-unit-files ${option}${service} | grep -w "${service}") ;then
${local_sudo} systemctl ${option}${enablement} ${service}
fi
}



##### Test helpers
##### Check helpers

# Check if the file(s) exist
verify_files_exist() {
Expand Down
20 changes: 10 additions & 10 deletions installation/routines/optimize_boot_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ OPTIMIZE_BOOT_CONF_HEADER="## Jukebox Boot Config"

_optimize_disable_irrelevant_services() {
echo " * Disable keyboard-setup.service"
set_optional_service_enablement keyboard-setup.service disable
sudo systemctl disable keyboard-setup.service

echo " * Disable triggerhappy.service"
set_optional_service_enablement triggerhappy.service disable
set_optional_service_enablement triggerhappy.socket disable
sudo systemctl disable triggerhappy.service
sudo systemctl disable triggerhappy.socket

echo " * Disable raspi-config.service"
set_optional_service_enablement raspi-config.service disable
sudo systemctl disable raspi-config.service

echo " * Disable apt-daily.service & apt-daily-upgrade.service"
set_optional_service_enablement apt-daily.service disable
set_optional_service_enablement apt-daily-upgrade.service disable
set_optional_service_enablement apt-daily.timer disable
set_optional_service_enablement apt-daily-upgrade.timer disable
sudo systemctl disable apt-daily.service
sudo systemctl disable apt-daily-upgrade.service
sudo systemctl disable apt-daily.timer
sudo systemctl disable apt-daily-upgrade.timer
}

# TODO: If false, actually make sure bluetooth is enabled
_optimize_handle_bluetooth() {
if [ "$DISABLE_BLUETOOTH" = true ] ; then
echo " * Disable hciuart.service and bluetooth"
set_optional_service_enablement hciuart.service disable
set_optional_service_enablement bluetooth.service disable
sudo systemctl disable hciuart.service
sudo systemctl disable bluetooth.service
fi
}

Expand Down

0 comments on commit 6baaaab

Please sign in to comment.