migrations: keep system helpers sudo-compatible
This commit is contained in:
@@ -4,15 +4,15 @@ DROP_IN="/etc/limine-entry-tool.d/intel-panther-lake-fred.conf"
|
||||
DEFAULT_LIMINE="/etc/default/limine"
|
||||
|
||||
if omarchy-hw-intel-ptl; then
|
||||
if [[ ! -f "$DROP_IN" ]] || ! grep -q 'fred=on' "$DROP_IN"; then
|
||||
mkdir -p /etc/limine-entry-tool.d
|
||||
cat > "$DROP_IN" <<EOF
|
||||
if [[ ! -f $DROP_IN ]] || ! grep -q 'fred=on' "$DROP_IN"; then
|
||||
sudo mkdir -p /etc/limine-entry-tool.d
|
||||
cat <<EOF | sudo tee "$DROP_IN" >/dev/null
|
||||
# Intel Panther Lake FRED support
|
||||
KERNEL_CMDLINE[default]+=" fred=on"
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ -f "$DEFAULT_LIMINE" ]] && ! grep -q 'fred=on' "$DEFAULT_LIMINE"; then
|
||||
cat "$DROP_IN" >> "$DEFAULT_LIMINE"
|
||||
if [[ -f $DEFAULT_LIMINE ]] && ! grep -q 'fred=on' "$DEFAULT_LIMINE"; then
|
||||
cat "$DROP_IN" | sudo tee -a "$DEFAULT_LIMINE" >/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -6,6 +6,6 @@ if omarchy-hw-intel && omarchy-battery-present; then
|
||||
cpu_model=$(grep -m1 "^model\s*:" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ')
|
||||
if [[ "$cpu_model" =~ ^(151|154|170|172|183|186|189|191|204)$ ]]; then
|
||||
omarchy-pkg-add intel-lpmd
|
||||
systemctl enable intel_lpmd.service
|
||||
sudo systemctl enable intel_lpmd.service
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -7,6 +7,6 @@ if omarchy-hw-intel; then
|
||||
cpu_model=${cpu_model:-0}
|
||||
if ((cpu_model >= 42)) && omarchy-battery-present; then
|
||||
omarchy-pkg-add thermald
|
||||
systemctl enable thermald.service
|
||||
sudo systemctl enable thermald.service
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user