on a second thought, the default IFS sucks

This commit is contained in:
Jack L. Frost 2015-09-01 13:05:37 +03:00
parent 5dad6a777e
commit 92b8205255
2 changed files with 9 additions and 9 deletions

16
rc.conf
View File

@ -22,16 +22,16 @@ ctrlaltdel soft
# Virtual filesystems # Virtual filesystems
cfg_mounts=( cfg_mounts=(
'run tmpfs /run' 'run:tmpfs:/run'
'tmp tmpfs /tmp' 'tmp:tmpfs:/tmp'
'proc proc /proc' 'proc:proc:/proc'
'sys sysfs /sys' 'sys:sysfs:/sys'
'dev devtmpfs /dev' 'dev:devtmpfs:/dev'
'pts devpts /dev/pts noexec,nosuid,gid=5,mode=0620' 'pts:devpts:/dev/pts:noexec,nosuid,gid=5,mode=0620'
'mqueue mqueue /dev/mqueue noexec,nosuid,nodev' 'mqueue:mqueue:/dev/mqueue:noexec,nosuid,nodev'
'shm tmpfs /dev/shm defaults,mode=0777' 'shm:tmpfs:/dev/shm:defaults,mode=0777'
) )
# Some temporary directories and files # Some temporary directories and files

2
rc.in
View File

@ -28,7 +28,7 @@ rc.tmpfiles() {
rc.mount() { rc.mount() {
for fs in "${cfg_mounts[@]}"; do for fs in "${cfg_mounts[@]}"; do
echo "$fs" | while read device fs_type mountpoint mount_options; do echo "$fs" | while IFS=':' read device fs_type mountpoint mount_options; do
[[ "$mount_options" ]] || { mount_options='defaults'; } [[ "$mount_options" ]] || { mount_options='defaults'; }