diff options
author | Evgeni Golov <evgeni@grml.org> | 2014-03-29 14:37:07 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@127011.net> | 2014-03-29 14:37:27 +0100 |
commit | 28ca8298a10702e391e420975205a98450d4cf7d (patch) | |
tree | 381d84f38e40bc4f67bb2d7fd10fd179f46e0033 /components/9990-overlay.sh | |
parent | e31d7cec9e48617a7509bab38cac32958f431d4e (diff) | |
download | live-boot-28ca8298a10702e391e420975205a98450d4cf7d.tar.gz live-boot-28ca8298a10702e391e420975205a98450d4cf7d.zip |
Do not throw warnings when /tmp/custom_mounts.list does not exist.
When no device for an overlay can be found, /tmp/custom_mounts.list
won't be created and will produce warnings while booting:
sort: /tmp/custom_mounts.list: No such file or directory
rm: can't remove '/tmp/custom_mounts.list': No such file or directory
Properly handle this case by calling rm with the -f option and calling
sort only when the file exists.
Diffstat (limited to 'components/9990-overlay.sh')
-rwxr-xr-x | components/9990-overlay.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/9990-overlay.sh b/components/9990-overlay.sh index 4ae5c07..52c045a 100755 --- a/components/9990-overlay.sh +++ b/components/9990-overlay.sh @@ -376,7 +376,7 @@ setup_unionfs () then local custom_mounts custom_mounts="/tmp/custom_mounts.list" - rm -rf ${custom_mounts} 2> /dev/null + rm -f ${custom_mounts} # Gather information about custom mounts from devies detected as overlays get_custom_mounts ${custom_mounts} ${overlay_devices} @@ -387,7 +387,7 @@ setup_unionfs () local used_overlays used_overlays="" used_overlays=$(activate_custom_mounts ${custom_mounts}) - rm ${custom_mounts} + rm -f ${custom_mounts} # Close unused overlays (e.g. due to missing $persistence_list) for overlay in ${overlay_devices} |