forked from zfsnap/zfsnap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
36 lines (28 loc) · 1.71 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
I have elected not to provide a make file to install zfsnap. The portability of
make across GNU, BSD, and SunOS systems is terrible, and the proper placement of
files varies enough that I don't want the headache.
So, I leave it to packagers to appropriately install and integrate zfsnap with
their OS. However, for those who don't have zfsnap packaged for their
OS and want a quick and dirty solution, the following should work on most
systems.
First, read the PORTABILITY file. Determine if #!/bin/sh will work for you (note
that /bin/sh usually points to another shell [most commonly bash, dash, or
ksh93], though not always --- with BSDs and Solaris 10 being notable exceptions).
If you need to use a different shell than /bin/sh, follow the instructions
(again, in the PORTABILITY file) to use tools/mod_shebang.sh.
I also *highly* recommend running the test suite. It takes less than a minute,
and will help verify the sanity of your particular mix of OS, architecture, and
shell.
cd zfsnap/tests
./run.sh
Then, move the entire zfsnap folder to /usr/local/src/zfsnap. Technically tests/
and tools/ are not needed to use zfsnap, but they don't get in the way and are
quite small. You can remove them if you wish.
You can add /usr/local/src/zfsnap/sbin to your PATH and
/usr/local/src/zfsnap/man/ to your MANPATH, or you can add symlinks to the
typical /usr/local locations and skip the PATH process altogether.
ln -s /usr/local/src/zfsnap/sbin/zfsnap.sh /usr/local/sbin/zfsnap
ln -s /usr/local/src/zfsnap/man/man8/zfsnap.8 /usr/local/share/man/man8/zfsnap.8
And if you like completion scripts (bash and zsh support being the best) then
source /usr/local/src/zfsnap/completion/zfsnap-completion.bash in your .bashrc
or .zshrc file.