mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-05-02 06:26:20 -04:00
Add function to always ensure discard mount option is enabled
This commit is contained in:
parent
d231bd3172
commit
e5b588265c
6 changed files with 12 additions and 3 deletions
|
@ -206,6 +206,14 @@ enableZram() {
|
|||
}
|
||||
export -f enableZram;
|
||||
|
||||
enableDiscard() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
sed -i '/\/data/{/discard/!s|nosuid|discard,nosuid|}' fstab.* root/fstab.* rootdir/fstab.* rootdir/etc/fstab.* &>/dev/null || true;
|
||||
echo "Enabled discard for $1";
|
||||
cd "$DOS_BUILD_BASE";
|
||||
}
|
||||
export -f enableDiscard;
|
||||
|
||||
enableForcedEncryption() {
|
||||
cd "$DOS_BUILD_BASE$1";
|
||||
sed -i 's|encryptable=/|forceencrypt=/|' fstab.* root/fstab.* rootdir/fstab.* rootdir/etc/fstab.* &>/dev/null || true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue