Browse Source

Minor corrections

master
Guillaume REMBERT 5 years ago
parent
commit
8a9209c2e1
4 changed files with 31 additions and 28 deletions
  1. +22
    -19
      cfg/sw/eurybox.conf
  2. +7
    -7
      sw/src/eurybox.functions.check
  3. +1
    -1
      sw/src/eurybox.functions.update
  4. +1
    -1
      sw/src/eurybox.functions.vm

+ 22
- 19
cfg/sw/eurybox.conf View File

@@ -5,7 +5,7 @@
#To be run from crontab:
#/etc/sudoers ==> #Defaults requiretty
#/etc/sudoers ==> #Defaults !visiblepw
#crontab -e ==> * * * * * flock -n /eurybox-install-dir/update.lock -c /eurybox-install-dir/sw/src/exploitation_center/core/update/eurybox_update >> /eurybox-install-dir/update.log 2>&1
#crontab -e ==> * * * * * flock -n /var/run/eurybox_update.lock -c /eurybox-install-dir/sw/src/exploitation_center/core/update/eurybox_update >> /var/log/eurybox_update.log 2>&1



@@ -197,24 +197,27 @@ EURYBOX_UPDATE_LOCAL_REPOSITORIES=(
[1,NAME]="centos7"
[1,ARCH]="x86_64"
[1,URI]="centos.mirrors.ovh.net::ftp.centos.org/7/"
[2,NAME]="openbsd59"
[2,ARCH]="amd64"
[2,URI]="ftp.fr.openbsd.org::OpenBSD/5.9/"
[3,NAME]="gentoo"
[3,ARCH]=""
[3,URI]="rsync.gentoo.org::gentoo-portage/"
[4,NAME]="archlinux"
[4,ARCH]="x86_64"
[4,URI]="fooo.biz::archlinux/"
[5,NAME]="ubuntu"
[5,ARCH]=""
[5,URI]="archive.ubuntu.com::ubuntu/"
[6,NAME]="fedora24"
[6,ARCH]="x86_64"
[6,URI]="fr2.rpmfind.net::linux/fedora/linux/releases/24/"
[7,NAME]="debian"
[7,ARCH]=""
[7,URI]="ftp.fr.debian.org::debian/"
[2,NAME]="epel7"
[2,ARCH]="x86_64"
[2,URI]="epel.mirrors.ovh.net::fedora-epel/7/"
[3,NAME]="openbsd59"
[3,ARCH]="amd64"
[3,URI]="ftp.fr.openbsd.org::OpenBSD/5.9/"
[4,NAME]="gentoo"
[4,ARCH]=""
[4,URI]="rsync.gentoo.org::gentoo-portage/"
[5,NAME]="archlinux"
[5,ARCH]="x86_64"
[5,URI]="fooo.biz::archlinux/"
[6,NAME]="ubuntu"
[6,ARCH]=""
[6,URI]="archive.ubuntu.com::ubuntu/"
[7,NAME]="fedora24"
[7,ARCH]="x86_64"
[7,URI]="fr2.rpmfind.net::linux/fedora/linux/releases/24/"
[8,NAME]="debian"
[8,ARCH]=""
[8,URI]="ftp.fr.debian.org::debian/"
)
EURYBOX_UPDATE_LOCAL_REPOSITORIES_NUMBER=`expr ${#EURYBOX_UPDATE_LOCAL_REPOSITORIES[@]} / 3`



+ 7
- 7
sw/src/eurybox.functions.check View File

@@ -56,7 +56,7 @@ eurybox_check_command()
{
local -i not_found
for cmd; do
command -v >&- "$cmd" || {
sudo command -v >&- "$cmd" || {
eurybox_display_message warning CHECK $"Command $cmd is not found"
let not_found++
}
@@ -114,7 +114,7 @@ eurybox_check_configuration ()
esac
case $EURYBOX_DISTRIB_MAC_TYPE in
selinux|none )
eurybox_display_message message CHECK "Distribution mandatory access control type configured: $EURYBOX_DISTRIB_MAC_TYPE"
eurybox_display_message message CHECK "Mandatory access control type configured: $EURYBOX_DISTRIB_MAC_TYPE"
;;
apparmor|* )
eurybox_display_message error CHECK "Unsupported mandatory access control type: $EURYBOX_DISTRIB_MAC_TYPE - please use selinux or none"
@@ -126,13 +126,13 @@ eurybox_check_configuration ()
#Checking backup target parameters
if [[ -z $EURYBOX_BACKUP_TYPE || ${#EURYBOX_BACKUP_DESTINATION[@]} -eq 0 || ${#EURYBOX_BACKUP_ARCHIVE[@]} -eq 0 ]]
then
eurybox_display_message error CHECK "Backup parameters not set:\nType:$EURYBOX_BACKUP_TYPE\nDestination:${EURYBOX_BACKUP_DESTINATION[*]}\nArchive:${EURYBOX_BACKUP_ARCHIVE[*]}\nTargets:${EURYBOX_BACKUP_TARGETS[*]}"
eurybox_display_message error CHECK "Archive parameters not set:\nType:$EURYBOX_BACKUP_TYPE\nDestination:${EURYBOX_BACKUP_DESTINATION[*]}\nArchive:${EURYBOX_BACKUP_ARCHIVE[*]}\nTargets:${EURYBOX_BACKUP_TARGETS[*]}"
else
eurybox_display_message message CHECK "Backup parameters:"
eurybox_display_message message CHECK "Backup type: $EURYBOX_BACKUP_TYPE"
eurybox_display_message message CHECK "Backup destination: ${EURYBOX_BACKUP_DESTINATION[*]}"
eurybox_display_message message CHECK "Archive parameters:"
eurybox_display_message message CHECK "Archive destination/origin: ${EURYBOX_BACKUP_DESTINATION[*]}"
eurybox_display_message message CHECK "Archive parameters: ${EURYBOX_BACKUP_ARCHIVE[*]}"
eurybox_display_message message CHECK "Archive targets: ${EURYBOX_BACKUP_TARGETS[*]}"
# eurybox_display_message message CHECK "Backup type: $EURYBOX_BACKUP_TYPE"
# eurybox_display_message message CHECK "Archive targets: ${EURYBOX_BACKUP_TARGETS[*]}"
fi
fi
if [[ $SCRIPT_TYPE = "UPDATE" ]]


+ 1
- 1
sw/src/eurybox.functions.update View File

@@ -140,7 +140,7 @@ eurybox_update_local_repository ()
eurybox_display_message debug UPDATE "Mkdir command output:\n$MKDIR_OUT"
eurybox_display_message debug UPDATE "Clone command output:\n$UPDATE_OUT"
#TODO:MAC MASK
UPDATE_OUT=`sudo chmod -R 500 ${REPO_PATH}/${NAME}/${ARCH} 2>&1`
UPDATE_OUT=`sudo chmod -R 555 ${REPO_PATH}/${NAME}/${ARCH} 2>&1`
STATUS=$?
if [[ $STATUS -eq 0 ]]
then


+ 1
- 1
sw/src/eurybox.functions.vm View File

@@ -202,7 +202,7 @@ eurybox_vm_shutdown_ssh ()
done
if [[ $NB_TRY_LEFT -eq 0 ]]
then
eurybox_display_message warning VM "VM $NAME - SSH stop failed - VM still running after $EURYBOX_MAX_RETRY_ON_FAILURE:\n$EURYBOX_VM_NAME\n error $STATUS:\n$SSH_OUT\nForcing stop"
eurybox_display_message warning VM "VM $NAME - SSH stop failed - VM still running after $EURYBOX_MAX_RETRY_ON_FAILURE\nForcing stop"
VIRSH_OUT=`sudo virsh $EURYBOX_VIRSH_OPTIONS destroy $NAME 2>&1`
STATUS=$?
if [[ !($STATUS -eq 0) ]]


Loading…
Cancel
Save