Skip to content

Commit

Permalink
Added xattrs test to see if the persistent ds supports xattrs; fixes #61
Browse files Browse the repository at this point in the history


Signed-off-by: Matt Bentley <[email protected]>
  • Loading branch information
mbentley committed Apr 7, 2021
1 parent 12487b6 commit 18cb509
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile.smb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM alpine:3.12
MAINTAINER Matt Bentley <[email protected]>

# install samba and s6; create supporting directories
RUN apk add --no-cache avahi avahi-compat-libdns_sd avahi-tools dbus samba-common-tools s6 samba-server &&\
RUN apk add --no-cache attr avahi avahi-compat-libdns_sd avahi-tools dbus samba-common-tools s6 samba-server &&\
touch /etc/samba/lmhosts &&\
rm /etc/samba/smb.conf &&\
rm /etc/avahi/services/*.service
Expand Down
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ else
fi
fi

# perform quick test to see if xattrs are supported
(cd /opt/${TM_USERNAME} && touch xattr-test; setfattr -n user.test -v "hello" xattr-test >/dev/null 2>&1 && rm xattr-test && echo "INFO: xattr test successful - your persistent data store supports xattrs") ||\
(echo "WARNING: test to set xattrs on a test file failed. Time machine may fail to back up to your persitent storage location."; rm xattr-test)

# run CMD
echo "INFO: entrypoint complete; executing '${*}'"
exec "${@}"

0 comments on commit 18cb509

Please sign in to comment.