|
|
@ -121,15 +121,13 @@ config_create_swap_fstab_entry() { |
|
|
|
local fstabnew |
|
|
|
local fstabnew |
|
|
|
|
|
|
|
|
|
|
|
mkdir -p /var/lock |
|
|
|
mkdir -p /var/lock |
|
|
|
lock -w /var/lock/fstab.lck && { |
|
|
|
lock /var/lock/fstab.lck |
|
|
|
lock /var/lock/fstab.lck |
|
|
|
fstabnew="$(mktemp -t '.fstab.XXXXXXXX')" |
|
|
|
fstabnew="$(mktemp -t '.fstab.XXXXXXXX')" |
|
|
|
cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" >>"$fstabnew" |
|
|
|
cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" >>"$fstabnew" |
|
|
|
[ "$enabled" -eq 1 ] && echo "$device none swap sw 0 0" >> "$fstabnew" |
|
|
|
[ "$enabled" -eq 1 ] && echo "$device none swap sw 0 0" >> "$fstabnew" |
|
|
|
cat "$fstabnew" >/tmp/fstab |
|
|
|
cat "$fstabnew" >/tmp/fstab |
|
|
|
rm -f $fstabnew |
|
|
|
rm -f $fstabnew |
|
|
|
lock -u /var/lock/fstab.lck |
|
|
|
lock -u /var/lock/fstab.lck |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
config_create_mount_fstab_entry() { |
|
|
|
config_create_mount_fstab_entry() { |
|
|
@ -146,15 +144,13 @@ config_create_mount_fstab_entry() { |
|
|
|
local fstabnew |
|
|
|
local fstabnew |
|
|
|
|
|
|
|
|
|
|
|
mkdir -p /var/lock |
|
|
|
mkdir -p /var/lock |
|
|
|
lock -w /var/lock/fstab.lck && { |
|
|
|
lock /var/lock/fstab.lck |
|
|
|
lock /var/lock/fstab.lck |
|
|
|
fstabnew="$(mktemp -t '.fstab.XXXXXXXX')" |
|
|
|
fstabnew="$(mktemp -t '.fstab.XXXXXXXX')" |
|
|
|
cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" | grep -v "$target" >>"$fstabnew" |
|
|
|
cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" | grep -v "$target" >>"$fstabnew" |
|
|
|
echo "$device $target $fstype $options 0 0" >>"$fstabnew" |
|
|
|
echo "$device $target $fstype $options 0 0" >>"$fstabnew" |
|
|
|
cat "$fstabnew" >/tmp/fstab |
|
|
|
cat "$fstabnew" >/tmp/fstab |
|
|
|
rm -f $fstabnew |
|
|
|
rm -f $fstabnew |
|
|
|
lock -u /var/lock/fstab.lck |
|
|
|
lock -u /var/lock/fstab.lck |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
libmount_find_token() { |
|
|
|
libmount_find_token() { |
|
|
|