-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: mount_option: handle commented lines
From fstab(5): ... Each filesystem is described on a separate line. Fields on each line are separated by tabs or spaces. Lines starting with '#' are comments. Blank lines are ignored. ... Line like: # /var needs dev should be ignored. Add test for this issue.
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
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,16 @@ | ||
#!/bin/bash | ||
|
||
# platform = multi_platform_all | ||
. $SHARED/partition.sh | ||
|
||
clean_up_partition {{{ MOUNTPOINT }}} | ||
|
||
create_partition | ||
|
||
make_fstab_given_partition_line {{{ MOUNTPOINT }}} ext2 defaults | ||
# comment last line added above to be ignored | ||
sed -Ei '${s/^/#/}' /etc/fstab | ||
|
||
make_fstab_given_partition_line {{{ MOUNTPOINT }}} ext2 {{{ MOUNTOPTION }}} | ||
|
||
mount_partition {{{ MOUNTPOINT }}} || true |