bail if $VOLATILE is not tmpfs, fixes #33

This commit is contained in:
graysky
2016-11-26 03:02:00 -05:00
parent 81f2a3f8ad
commit 5b3471ea25
3 changed files with 12 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
VERSION = 5.84
VERSION = 5.85
PN = anything-sync-daemon
PREFIX ?= /usr

View File

@@ -71,9 +71,13 @@ VOLATILE="${VOLATILE%%+(/)}"
$previous_extglob_setting
unset previous_extglob_setting
[[ -z "$VOLATILE" ]] && VOLATILE=/tmp
# bail if $VOLATILE isn't tmpfs
df -T "$VOLATILE" | grep -m 1 -q tmpfs || {
echo "$VOLATILE is not tmpsfs so running asd is pointless. Aborting." >&2
exit 1; }
# simple function to determine user intent rather than using a null value
case "${USE_OVERLAYFS,,}" in
y|yes|true|t|on|1|enabled|enable|use)

View File

@@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man
.TH anything-sync-daemon 1 "25 November 2016" "" ""
.TH anything-sync-daemon 1 "26 November 2016" "" ""
.SH NAME
\fBanything-sync-daemon \fP- Symlinks and syncs user specified dirs to RAM thus reducing HDD/SDD calls and speeding-up the system.
\fB
@@ -16,11 +16,11 @@ Reduced wear to physical discs (particularly SSDs).
Speed.
.RE
.PP
Since the sync targets is relocated into tmpfs (RAM disk), the corresponding onslaught of I/O associated with system usage of them is also redirected from the physical disc to RAM, thus reducing wear to the physical disc and also improving speed and responsiveness. The access time of RAM is on the order of nanoseconds while the access time of physical discs is on the order of milliseconds. This is a difference of six orders of magnitude or 1,000,000 times faster.
Since the sync targets is relocated into tmpfs (RAM disk), the corresponding onslaught of I/O associated with system usage of them is also redirected from the physical disc to RAM, thus reducing wear to the physical disc and also improving speed and responsiveness.
.SH SETUP
/etc/asd.conf contains all user managed settings.
.PP
WARNING -- Any edits made to /etc/asd.conf while asd is running will be applied only after asd has been restarted from the init service.
NOTE: edits made to /etc/asd.conf while asd is running will be applied only after asd has been restarted from the init service.
.RS
.IP \(bu 3
At a minimum, define the sync targets to be managed by asd in the WHATTOSYNC array. Syntax below.
@@ -54,13 +54,13 @@ Example:
.fi
.SH RUNNING ASD
.SS PREVIEW MODE
The preview (parse) option can be called to show users exactly what asd will do/is doing based on the entries in /etc/asd.conf as well printout useful information such as dir size, paths, and if any recovery snapshots have been created.
The preview option can be called to show users exactly what asd will do/is doing based on the entries in /etc/asd.conf as well printout useful information such as dir size, paths, and if any recovery snapshots have been created.
.PP
.nf
.fam C
$ asd p
Anything-sync-daemon v5.61 on Arch Linux.
Anything-sync-daemon on Arch Linux.
Systemd service is currently active.
Systemd resync service is currently active.
@@ -97,7 +97,7 @@ Note that if a sync target is owned by root or another user, and if you call asd
.fam C
$ asd c
Anything-sync-daemon v5.61 on Arch Linux.
Anything-sync-daemon on Arch Linux.
Deleting 2 crashrecovery dirs for sync target /srv/http/serve
/srv/http/.serve-backup_asd-crashrecovery-20141105_124948