mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-07-27 07:34:50 +02:00
Fix BUG:sed's back-references method may appear differently every time.
This commit is contained in:
parent
977cb64e44
commit
fcdf429202
@ -338,7 +338,8 @@ add_option_to_fstab() {
|
|||||||
# /dev/sda9 /home ext4 auto,acl,errors=remount-ro 0 2
|
# /dev/sda9 /home ext4 auto,acl,errors=remount-ro 0 2
|
||||||
# /dev/sda9 /home ext4 auto,acl,errors=remount-ro,nodev 0 2
|
# /dev/sda9 /home ext4 auto,acl,errors=remount-ro,nodev 0 2
|
||||||
debug "Sed command : sed -ie \"s;\(.*\)\(\s*\)\s\($PARTITION\)\s\(\s*\)\(\w*\)\(\s*\)\(\w*\)*;\1\2 \3 \4\5\6\7,$OPTION;\" /etc/fstab"
|
debug "Sed command : sed -ie \"s;\(.*\)\(\s*\)\s\($PARTITION\)\s\(\s*\)\(\w*\)\(\s*\)\(\w*\)*;\1\2 \3 \4\5\6\7,$OPTION;\" /etc/fstab"
|
||||||
sed -ie "s;\(.*\)\(\s*\)\s\($PARTITION\)\s\(\s*\)\(\w*\)\(\s*\)\(\w*\)*;\1\2 \3 \4\5\6\7,$OPTION;" /etc/fstab
|
# sed -ie "s;\(.*\)\(\s*\)\s\($PARTITION\)\s\(\s*\)\(\w*\)\(\s*\)\(\w*\)*;\1\2 \3 \4\5\6\7,$OPTION;" /etc/fstab
|
||||||
|
sed -ie "s;\(^[^#].*${PARTITION}\)\(\s.*\)\(\s\w.*\)\(\s[0-2]\s*[0-2]\);\1\2\3,${OPTION}\4;" /etc/fstab
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup mount option in fstab (todo)
|
# Setup mount option in fstab (todo)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user