New packages and improve installation quality
This commit is contained in:
parent
d8a7ce5ecf
commit
8f5cd9a6be
2 changed files with 46 additions and 34 deletions
8
Makefile
8
Makefile
|
|
@ -15,8 +15,8 @@ install:
|
||||||
$(SHELL) commands/first-install.sh
|
$(SHELL) commands/first-install.sh
|
||||||
$(MAKEDIR) -p $(DEST)
|
$(MAKEDIR) -p $(DEST)
|
||||||
$(COPY) -r ACU/ $(DEST)
|
$(COPY) -r ACU/ $(DEST)
|
||||||
test -d $(GITOLITE_DEST) && $(MAKEDIR) -p $(GITOLITE_DEST)/update.secondary.d
|
! test -d $(GITOLITE_DEST) || $(MAKEDIR) -p $(GITOLITE_DEST)/update.secondary.d
|
||||||
test -d $(GITOLITE_DEST) && $(COPY) hooks/* $(GITOLITE_DEST)/update.secondary.d/
|
! test -d $(GITOLITE_DEST) || $(COPY) hooks/* $(GITOLITE_DEST)/update.secondary.d/
|
||||||
|
|
||||||
update:
|
update:
|
||||||
$(GIT) pull
|
$(GIT) pull
|
||||||
|
|
@ -26,8 +26,8 @@ upgrade: install
|
||||||
|
|
||||||
unstall:
|
unstall:
|
||||||
$(RM) -r $(DEST)/ACU/
|
$(RM) -r $(DEST)/ACU/
|
||||||
test -d $(GITOLITE_DEST) && $(RM) -rf $(GITOLITE_DEST)/update.secondary.d
|
! test -d $(GITOLITE_DEST) || $(RM) -rf $(GITOLITE_DEST)/update.secondary.d
|
||||||
test -d $(GITOLITE_DEST) && $(MAKEDIR) -p $(GITOLITE_DEST)/update.secondary.d
|
! test -d $(GITOLITE_DEST) || $(MAKEDIR) -p $(GITOLITE_DEST)/update.secondary.d
|
||||||
|
|
||||||
test:
|
test:
|
||||||
$(PROVER) $(TESTDIR)
|
$(PROVER) $(TESTDIR)
|
||||||
|
|
|
||||||
|
|
@ -1,58 +1,70 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
# Install missing packets
|
# Install missing packages
|
||||||
DEB_PACKAGES_LIST="screen libnet-ldap-perl libxml-libxml-perl libgearman-client-perl libmailtools-perl libmail-sendmail-perl libdate-manip-perl"
|
DEB_PACKAGES_LIST="screen libnet-ldap-perl libxml-libxml-perl libgearman-client-perl libmailtools-perl libmail-sendmail-perl libdatetime-format-iso8601-perl libnet-ip-perl"
|
||||||
ARCH_PACKAGES_LIST="screen perl-io-socket-ssl perl-email-simple perl-email-mime perl-term-readkey perl-ldap perl-lwp-protocol-https"
|
ARCH_PACKAGES_LIST="screen perl-io-socket-ssl perl-email-simple perl-email-mime perl-term-readkey perl-ldap perl-lwp-protocol-https perl-datetime-format-iso8601 perl-net-ip"
|
||||||
FBSD_PACKAGES_LIST="screen p5-IO-Socket-SSL p5-Email-Simple p5-Email-MIME p5-Term-ANSIColor p5-Term-ReadKey p5-LWP-Protocol-https"
|
FBSD_PACKAGES_LIST="screen p5-IO-Socket-SSL p5-Email-Simple p5-Email-MIME p5-Term-ANSIColor p5-Term-ReadKey p5-LWP-Protocol-https p5-DateTime-Format-ISO8601 p5-Net-IP"
|
||||||
|
|
||||||
if [ `uname -s` = "FreeBSD" ]
|
KERNEL=`uname -s`
|
||||||
|
|
||||||
|
if [ "$KERNEL" = "FreeBSD" ]
|
||||||
then
|
then
|
||||||
|
|
||||||
for PK in $FBSD_PACKAGES_LIST
|
for PK in $FBSD_PACKAGES_LIST
|
||||||
do
|
do
|
||||||
if ! pkg info "$PK" > /dev/null 2> /dev/null
|
if ! pkg info "$PK" > /dev/null 2> /dev/null
|
||||||
then
|
then
|
||||||
PACKAGESITE="ttp://canon.acu.epita.fr/repo-lab" pkg install "$PK"
|
PACKAGESITE="http://canon.acu.epita.fr/repo-lab" pkg install "$PK"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
elif [ -f "/etc/debian_version" ]
|
elif [ "$KERNEL" = "Linux"]
|
||||||
then
|
then
|
||||||
|
|
||||||
if ! whereis dpkg > /dev/null 2> /dev/null
|
if [ -f "/etc/debian_version" ]
|
||||||
then
|
then
|
||||||
aptitude install dpkg
|
|
||||||
fi
|
|
||||||
|
|
||||||
for PK in $DEB_PACKAGES_LIST
|
if ! whereis dpkg > /dev/null 2> /dev/null
|
||||||
do
|
|
||||||
if ! dpkg -l | grep "^ii" | grep "$PK" > /dev/null 2> /dev/null
|
|
||||||
then
|
then
|
||||||
aptitude install "$PK"
|
aptitude install dpkg
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
for PK in $DEB_PACKAGES_LIST
|
||||||
|
do
|
||||||
|
if ! dpkg -l | grep "^ii" | grep "$PK" > /dev/null 2> /dev/null
|
||||||
|
then
|
||||||
|
aptitude install "$PK"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
# Add intradmin user if missing
|
# Add intradmin user if missing
|
||||||
if ! getent passwd | grep "intradmin:" > /dev/null 2> /dev/null
|
if ! getent passwd | grep "intradmin:" > /dev/null 2> /dev/null
|
||||||
|
then
|
||||||
|
useradd --shell /bin/false --uid 942 intradmin &&
|
||||||
|
mkdir -p /home/intradmin
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R intradmin:intradmin /home/intradmin
|
||||||
|
|
||||||
|
elif [ -f "/etc/arch-release" ]
|
||||||
then
|
then
|
||||||
useradd --shell /bin/false --uid 942 intradmin &&
|
|
||||||
mkdir -p /home/intradmin
|
for PK in $ARCH_PACKAGES_LIST
|
||||||
|
do
|
||||||
|
if ! pacman -Qi "$PK" > /dev/null 2> /dev/null
|
||||||
|
then
|
||||||
|
pacman -S "$PK"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "Unknown distribution :("
|
||||||
|
exit 1;
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R intradmin:intradmin /home/intradmin
|
|
||||||
|
|
||||||
elif [ -f "/etc/arch-release" ]
|
|
||||||
then
|
|
||||||
|
|
||||||
for PK in $ARCH_PACKAGES_LIST
|
|
||||||
do
|
|
||||||
if ! pacman -Qi "$PK" > /dev/null 2> /dev/null
|
|
||||||
then
|
|
||||||
pacman -S "$PK"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "Unknown operating system :("
|
echo "Unknown operating system :("
|
||||||
|
|
|
||||||
Reference in a new issue