Skip to content

Commit ef031fc

Browse files
committed
update grub timeout
1 parent c41c703 commit ef031fc

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

bs.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
# shellcheck disable=SC2015
23

34
# wifi performance
45
echo "[connection]
@@ -8,7 +9,7 @@ wifi.powersave = 2
89
sudo cp -f /etc/NetworkManager/conf.d/wifi-powersave.conf /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
910
[ ! -f /lib/NetworkManager/conf.d/20-connectivity-ubuntu.conf ] || sudo sed -i "s/uri=.*$/uri=/" /lib/NetworkManager/conf.d/20-connectivity-ubuntu.conf
1011

11-
if grep -q Raspberry /proc/device-tree/model; then
12+
if grep -q Raspberry /proc/device-tree/model &>/dev/null; then
1213

1314
# wifi 2.4GHz performance
1415
grep -q dtoverlay=disable-bt /boot/firmware/config.txt || echo "dtoverlay=disable-bt" | sudo tee -a /boot/firmware/config.txt >/dev/null
@@ -21,9 +22,17 @@ if grep -q Raspberry /proc/device-tree/model; then
2122
fi
2223

2324
# Verbose boot
24-
if [ -f /etc/default/grub ] && grep -q "quiet splash" /etc/default/grub; then
25+
if [ -f /etc/default/grub ]; then
26+
sudo cp -f /etc/default/grub /etc/default/grub.bak
2527
sudo sed -i 's/quiet splash//g' /etc/default/grub
26-
grep -q "GRUB_CMDLINE_LINUX_DEFAULT" /etc/default/grub || echo "GRUB_CMDLINE_LINUX_DEFAULT=\"\"" | sudo tee -a /etc/default/grub >/dev/null
27-
grep -q "nosplash debug --verbose" /etc/default/grub || echo "GRUB_CMDLINE_LINUX=\"nosplash debug --verbose\"" | sudo tee -a /etc/default/grub >/dev/null
28-
sudo update-grub
28+
29+
if grep -q "GRUB_CMDLINE_LINUX_DEFAULT" /etc/default/grub; then
30+
grep -q "nosplash debug --verbose" /etc/default/grub || sudo sed -i 's/^GRUB_CMDLINE_LINUX="\(.*\)/GRUB_CMDLINE_LINUX="nosplash debug --verbose \1/' /etc/default/grub
31+
else
32+
echo "GRUB_CMDLINE_LINUX_DEFAULT=\"nosplash debug --verbose\"" | sudo tee -a /etc/default/grub >/dev/null
33+
fi
34+
35+
grep -q "GRUB_TIMEOUT=" /etc/default/grub && sudo sed -i 's/^GRUB_TIMEOUT=0/GRUB_TIMEOUT=3/' /etc/default/grub || echo "GRUB_TIMEOUT=3" | sudo tee -a /etc/default/grub >/dev/null
36+
diff /etc/default/grub.bak /etc/default/grub >/dev/null || sudo update-grub
37+
sudo rm -f /etc/default/grub.bak
2938
fi

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Homepage: https://github.com/ipitio/closure
44
Standards-Version: 3.9.2
55

66
Package: closure
7-
Version: 1.7.1
7+
Version: 1.7.2
88
Maintainer: ipitio <[email protected]>
99
Depends: curl, flatpak, gpg, hostapd, isc-dhcp-server, iw, macchanger, netplan.io, network-manager, net-tools, qrencode, rfkill, wireguard, wireless-tools, wget
1010
Recommends: containerd.io, docker-ce, docker-ce-cli, docker-buildx-plugin, docker-compose-plugin

debian/prerm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ pushd /opt/closure || exit 1
66
! grep /opt/closure /etc/rc.local &>/dev/null || rm -f /etc/rc.local
77
grep -oP '^(Files:)? [^ ]+(?= /opt/closure)' debian/control | grep -oP '(?<= ).+' | sed -r 's/^debian\//DEBIAN\//g' | while read -r file; do [ ! -f "$file" ] || rm -f "$file"; done
88
find . -type d -empty -delete
9-
[ ! -f /usr/share/doc/closure ] || rm -f /usr/share/doc/closure
9+
[ ! -d /usr/share/doc/closure ] || rm -rf /usr/share/doc/closure
1010
popd || exit 1

0 commit comments

Comments
 (0)