Greetings;
As you know, I script most of the things I do that are repetitive, and a
fresh amanda install is no exception.
You have all seen my "gh.cf" script, but here it is again:
----------------------
#!/bin/sh
# since I'm always forgetting to su amanda...
if [ `whoami` != 'amanda' ]; then
echo
echo "!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!"
echo "Amanda needs to be configured and built by the"
echo "user amanda, but must be installed by user root."
echo
exit 1
fi
make clean
rm -f config.status config.cache
./configure --with-user=amanda \
--with-group=disk \
--with-owner=amanda \
--with-gnu-ld \
--prefix=/usr/local \
--with-debugging=/tmp/amanda-dbg/ \
--with-tape-server=coyote \
--with-bsdtcp-security --with-amandahosts \
--with-configdir=/usr/local/etc/amanda \
--with-config=Daily \
--with-gnutar=/bin/tar
echo "sleeping 5 seconds for reading configures warnings"
echo "a make as amanda will continue after..."
sleep 5
make
---------------------------
As that is limited due to the requirement that it be run as the user, in this
case amanda, I wrote another script to wrap that one in about a year ago.
Here it is: The cli is ./newmanda amanda-2.6.2alpha-20090904 (or whatever
version is being built)
----------------------------
#!/bin/bash
VER=${1}
echo $VER
VER2=${1}.tar.gz
echo $VER2
su amanda -c "tar xzf $VER2" && \
su amanda -c "cp gh.cf $VER/" && \
cd $VER && \
su amanda -c "./gh.cf" && \
make install && \
su amanda -c "amcheck Daily"
----------------------------
Pretty simple. However at the end of it, where it does the last line, it
complained:
-------------------------
amcheck: running as user "root" instead of "amanda".
Change user to "amanda" or change dump user to "root" in amanda.conf
-------------------------
Humm, problem, so I ran that last line by hand:
-------------------------
[root@coyote amanda]# su amanda -c "amcheck Daily"
amcheck: running as user "root" instead of "amanda".
Change user to "amanda" or change dump user to "root" in amanda.conf
[root@coyote amanda]# su amanda
[amanda@coyote ~]$ amcheck Daily
amcheck: running as user "root" instead of "amanda".
Change user to "amanda" or change dump user to "root" in amanda.conf
-------------------------
/usr/local/etc/amanda/Daily/amanda.conf wasn't touched by the install. So I
will re-install the 0831 version, this one seems to have a buglet.
And of course it is the labor day weekend here in the states. Murphy is
alive and well. :)
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
The NRA is offering FREE Associate memberships to anyone who wants them.
<https://www.nrahq.org/nrabonus/accept-membership.asp>
There are times when truth is stranger than fiction and lunch time is one
of them.
|