-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add configurations to setup fscache
Since using `/dev/cachefiles` requires sudo mode, so some environment variables are defined and we use `sudo -E` to pass these environment variables to sudo operations. The script file for enabling fscache is misc/fscache/setup.sh Signed-off-by: hijackthe2 <[email protected]>
- Loading branch information
1 parent
cdc41de
commit 689900c
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# This script should be executed in root mode! | ||
|
||
apt update | ||
apt install -y cachefilesd | ||
apt list --installed | grep cachefilesd | ||
chmod a+w /etc/default/cachefilesd | ||
sed -i 's/#RUN=yes/RUN=yes/' /etc/default/cachefilesd | ||
cat /etc/default/cachefilesd | ||
/sbin/modprobe -qab cachefiles | ||
/sbin/cachefilesd -f /etc/cachefilesd.conf | ||
systemctl status cachefilesd | ||
[ -c /dev/cachefiles ] && echo "cachefilesd is successfully enabled" | ||
pid=$(lsof /dev/cachefiles | awk '{if (NR>1) {print $2}}') | ||
kill -9 $pid | ||
echo "/dev/cachefiles is available now" |