Add polkit pkla directory creation and warning of split package.
This commit is contained in:
parent
0c6179c922
commit
7388516400
@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "[+] Activating hibernate support!";
|
echo "[+] Activating hibernate support!";
|
||||||
echo "[i] Pass the reserved swap size in bytes to reserve some swap space for non-hibernate image usage.";
|
echo "[i] Pass the reserved swap size in bytes to reserve some swap space for non-hibernate image usage.";
|
||||||
|
echo "[!] WARNING polkitd-pkla needs to be installed in newer distributions due to being split from the main package!";
|
||||||
szresv=1073741824;
|
szresv=1073741824;
|
||||||
if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -gt 0 ]; then
|
if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -gt 0 ]; then
|
||||||
szresv=$1;
|
szresv=$1;
|
||||||
@ -17,6 +18,7 @@ if [ $szmem -gt $szhiber ]; then
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi;
|
fi;
|
||||||
echo "[*] Hibernate image is $szhiber bytes!";
|
echo "[*] Hibernate image is $szhiber bytes!";
|
||||||
|
sudo mkdir -p /etc/polkit-1/localauthority/90-mandatory.d;
|
||||||
sudo cp -f hibernate-source-files/enable-hibernate.pkla /etc/polkit-1/localauthority/90-mandatory.d/enable-hibernate.pkla;
|
sudo cp -f hibernate-source-files/enable-hibernate.pkla /etc/polkit-1/localauthority/90-mandatory.d/enable-hibernate.pkla;
|
||||||
sudo rm -f /etc/systemd/system/hibernate_image_size.service;
|
sudo rm -f /etc/systemd/system/hibernate_image_size.service;
|
||||||
cat hibernate-source-files/hibernate_image_size.service.p1 | head -c -1 | sudo tee /etc/systemd/system/hibernate_image_size.service > /dev/null;
|
cat hibernate-source-files/hibernate_image_size.service.p1 | head -c -1 | sudo tee /etc/systemd/system/hibernate_image_size.service > /dev/null;
|
||||||
|
Loading…
Reference in New Issue
Block a user