New packages and improve installation quality
This commit is contained in:
parent
d8a7ce5ecf
commit
8f5cd9a6be
2 changed files with 48 additions and 36 deletions
8
Makefile
8
Makefile
|
@ -15,8 +15,8 @@ install:
|
|||
$(SHELL) commands/first-install.sh
|
||||
$(MAKEDIR) -p $(DEST)
|
||||
$(COPY) -r ACU/ $(DEST)
|
||||
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) || $(MAKEDIR) -p $(GITOLITE_DEST)/update.secondary.d
|
||||
! test -d $(GITOLITE_DEST) || $(COPY) hooks/* $(GITOLITE_DEST)/update.secondary.d/
|
||||
|
||||
update:
|
||||
$(GIT) pull
|
||||
|
@ -26,8 +26,8 @@ upgrade: install
|
|||
|
||||
unstall:
|
||||
$(RM) -r $(DEST)/ACU/
|
||||
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) || $(RM) -rf $(GITOLITE_DEST)/update.secondary.d
|
||||
! test -d $(GITOLITE_DEST) || $(MAKEDIR) -p $(GITOLITE_DEST)/update.secondary.d
|
||||
|
||||
test:
|
||||
$(PROVER) $(TESTDIR)
|
||||
|
|
|
@ -1,58 +1,70 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Install missing packets
|
||||
DEB_PACKAGES_LIST="screen libnet-ldap-perl libxml-libxml-perl libgearman-client-perl libmailtools-perl libmail-sendmail-perl libdate-manip-perl"
|
||||
ARCH_PACKAGES_LIST="screen perl-io-socket-ssl perl-email-simple perl-email-mime perl-term-readkey perl-ldap perl-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"
|
||||
# Install missing packages
|
||||
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 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 p5-DateTime-Format-ISO8601 p5-Net-IP"
|
||||
|
||||
if [ `uname -s` = "FreeBSD" ]
|
||||
KERNEL=`uname -s`
|
||||
|
||||
if [ "$KERNEL" = "FreeBSD" ]
|
||||
then
|
||||
|
||||
for PK in $FBSD_PACKAGES_LIST
|
||||
do
|
||||
if ! pkg info "$PK" > /dev/null 2> /dev/null
|
||||
then
|
||||
PACKAGESITE="ttp://canon.acu.epita.fr/repo-lab" pkg install "$PK"
|
||||
PACKAGESITE="http://canon.acu.epita.fr/repo-lab" pkg install "$PK"
|
||||
fi
|
||||
done
|
||||
|
||||
elif [ -f "/etc/debian_version" ]
|
||||
elif [ "$KERNEL" = "Linux"]
|
||||
then
|
||||
|
||||
if ! whereis dpkg > /dev/null 2> /dev/null
|
||||
if [ -f "/etc/debian_version" ]
|
||||
then
|
||||
aptitude install dpkg
|
||||
fi
|
||||
|
||||
for PK in $DEB_PACKAGES_LIST
|
||||
do
|
||||
if ! dpkg -l | grep "^ii" | grep "$PK" > /dev/null 2> /dev/null
|
||||
if ! whereis dpkg > /dev/null 2> /dev/null
|
||||
then
|
||||
aptitude install "$PK"
|
||||
aptitude install dpkg
|
||||
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
|
||||
if ! getent passwd | grep "intradmin:" > /dev/null 2> /dev/null
|
||||
# Add intradmin user if missing
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
echo "Unknown operating system :("
|
||||
|
|
Reference in a new issue