mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-25 12:58:35 -06:00
new: Added autofs-fix-lag*
This commit is contained in:
parent
8b8d13bb41
commit
16eb2379cd
3 changed files with 29 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
![Number of scripts](https://img.shields.io/badge/number_of_scripts-36-blue)
|
![Number of scripts](https://img.shields.io/badge/number_of_scripts-38-blue)
|
||||||
# Random Scripts
|
# Random Scripts
|
||||||
This repository is for random scripts I wrote mostly for personal use.
|
This repository is for random scripts I wrote mostly for personal use.
|
||||||
|
|
||||||
|
|
7
autofs-fix-lag-login.sh
Normal file
7
autofs-fix-lag-login.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This script is needed to start autofs at login, in case I'm switching users.
|
||||||
|
# I add this as a login script in KDE.
|
||||||
|
# Look at autofs-fix-lag-logout.sh for more info.
|
||||||
|
|
||||||
|
systemctl start autofs
|
21
autofs-fix-lag-logout.sh
Normal file
21
autofs-fix-lag-logout.sh
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This script is needed to stop autofs at logout so that it's stopped before
|
||||||
|
# network is down and does not cause delay in shutdown or reboot.
|
||||||
|
# I run this as a logout script from KDE. We need to make sure that password
|
||||||
|
# isn't needed to stop autofs. For that, create this file.
|
||||||
|
# /etc/polkit-1/rules.d/autofs-service.rules
|
||||||
|
# -------------------------------------------
|
||||||
|
# polkit.addRule(function(action, subject) {
|
||||||
|
# if (action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||||
|
# subject.isInGroup("usergroup")) {
|
||||||
|
# if (action.lookup("unit") == "autofs.service") {
|
||||||
|
# var verb = action.lookup("verb");
|
||||||
|
# if (verb == "start" || verb == "stop" || verb == "restart") {
|
||||||
|
# return polkit.Result.YES;
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
# });
|
||||||
|
|
||||||
|
systemctl stop autofs
|
Loading…
Reference in a new issue