diff options
-rw-r--r-- | board/common.sh | 9 | ||||
-rw-r--r-- | board/pulseaudio.sh | 7 |
2 files changed, 10 insertions, 6 deletions
diff --git a/board/common.sh b/board/common.sh index ecda59d..8153c2b 100644 --- a/board/common.sh +++ b/board/common.sh @@ -6,3 +6,12 @@ remove_text() { echo sed --in-place "s/$2//" $1 sed --in-place "s/$2//" $1 } + +add_tmpfs() { + create_missing_dir "$1" + if ! grep -qE '$1' "${TARGET_DIR}/etc/fstab"; then + cat << __EOF__ >> "${TARGET_DIR}/etc/fstab" +tmpfs $1 tmpfs rw 0 0 +__EOF__ + fi +} diff --git a/board/pulseaudio.sh b/board/pulseaudio.sh index a789bc9..4737a6a 100644 --- a/board/pulseaudio.sh +++ b/board/pulseaudio.sh @@ -5,12 +5,7 @@ ############################## # Create the directory where pulseaudio store its files and put it in tempfs -create_missing_dir "/var/lib/pulse" -if ! grep -qE '/var/lib/pulse' "${TARGET_DIR}/etc/fstab"; then - cat << __EOF__ >> "${TARGET_DIR}/etc/fstab" -tmpfs /var/lib/pulse tmpfs rw 0 0 -__EOF__ -fi +add_tmpfs "/var/lib/pulse" if ! grep -qE '^load-module module-native-protocol-tcp' "${TARGET_DIR}/etc/pulse/system.pa"; then cat << __EOF__ >> "${TARGET_DIR}/etc/pulse/system.pa" |