На самом деле все не так страшно.
Да, действительно, FreePBX Distro на офлайновый компьютер не поставить - он кучу всего ставит в онлайне при первом запуске.
Для этого запускается файлик pbx_first_boot.sh
Код: Выделить всё
#!/bin/bash
# OUTPUT
if grep 'debug' /installed-version
then
echo "SKIPPING THE DEFAULT RUN OF FIRSTBOOT"
sleep 5
exit 0
else
echo "STARTING PBX FIRST BOOT"
fi
log_info(){
echo "${@}" >> /dev/tty8
}
# LOGGING TO TTY8 and logfile
ORIGCONSOLE=$(fgconsole)
echo "starting on console 8, myconsole = ${ORIGCONSOLE}"
sleep 1
chvt 8
set -x -v
exec > /var/log/pbx/install/firstboot.log
exec 2>&1
#INCLUDING stringent.sh
# stringent.sh copyright michael potter 2008
# stringent.sh is intended to reduce the problems associated with
# using bash by turning on bash options that make errors more
# apparent. This will not eliminate problems and I am sure there
# is some case where some problem will be made worse.
# USE AT YOUR OWN RISK.
set -o errexit # errexit first
set -o noclobber
set -o nounset
set -o pipefail # if you fail on this line, get a newer version of bash.
function traperr
{
declare -i i;
declare -i nestlevel;
declare Message=${1:-""}
nestlevel=${#FUNCNAME[@]}
if (( $nestlevel <= 2 ))
then
echo "ERROR: ${BASH_SOURCE[1]}:${BASH_LINENO[0]} $Message" >&2
else
echo "ERROR: ${FUNCNAME[1]}(${BASH_SOURCE[1]}:~${BASH_LINENO[0]}) $Message" >&2
for (( i = 2 ; i < $nestlevel ; i++ ))
do
echo " ${FUNCNAME[$i]}(${BASH_SOURCE[$i]}:~${BASH_LINENO[($i-1)]})" >&2
done
fi
# if BASH_SUBSHELL is 0, then script will exit anyway.
if (( $BASH_SUBSHELL >= 3 ))
then
kill $$
fi
echo -e "Some firstboot error occured, and the system is not properly setup.\nCheck to see if you have internet access and re-run /etc/pbx_first_boot.sh\nPress ctrl-alt-f1 to continue" >> /dev/tty8
exit 1
}
function traperrsimple
{
# Use this function if the above function fails
echo "ERROR: ${BASH_SOURCE[0]} ${LINENO}" >&2
# if BASH_SUBSHELL is 0, then script will exit anyway.
if (( $BASH_SUBSHELL >= 1 ))
then
kill $$
fi
}
set -o errtrace
trap traperr ERR
function errexiton
{
set -o errexit
trap traperr ERR
}
function errexitoff
{
set +o errexit
trap '' ERR
}
#END INCLUDE
# test for internet
log_info "Testing for internet access"
INTERFACE=$(ip route show | awk ' /^default/ { print $5 }')
MACADDR=$(ip -o link show ${INTERFACE} | awk '/link/ {print $13}')
MACHASH=$(echo -en ${MACADDR} | md5sum - | awk '/-/ {print $1}')
ARCH=$(uname -m)
FREEPBXVERS=$(head -n 1 /etc/schmooze/pbx-version)
INSTALLTYPE=$(cat /installed-version | sed -e 's/.*kickstart-\([^.]*\).*/\1/')
BRAND=$(head -n 1 /etc/schmooze/pbx-brand)
UARETURN=$(curl -s -m 30 -A "FreePBX Firstboot ${BRAND}-${FREEPBXVERS} ${ARCH} ${INSTALLTYPE}" --data mac=${MACADDR} --data mhash=${MACHASH} http://kickstart.freepbxdistro.org/install-log/)
echo ${UARETURN} | grep 'passed'
errexitoff
# Install FreePBX RPM
log_info "Please wait while we install FreePBX GUI"
log_info " This can take anywhere from 5-10 minutes"
/usr/bin/yum -q -y install freepbx-2.11*
# Enable modules that in 2.11 are not being enabled from the RPM
log_info " ... Enabling Asterisk modules"
sudo -u asterisk /var/lib/asterisk/bin/module_admin enable fw_ari
sudo -u asterisk /var/lib/asterisk/bin/module_admin enable framework
sudo -u asterisk /var/lib/asterisk/bin/module_admin disable fw_fop
sudo -u asterisk /var/lib/asterisk/bin/retrieve_conf
sudo -u asterisk /var/lib/asterisk/bin/module_admin reload
# pull in all freepbx modules and load them
log_info " ... Loading all FreePBX modules"
`which amportal` chown
# Install all core modules and reload
sudo -u asterisk /var/lib/asterisk/bin/module_admin download dahdiconfig
sudo -u asterisk /var/lib/asterisk/bin/module_admin install dahdiconfig
sudo -u asterisk /var/lib/asterisk/bin/module_admin installall
sudo -u asterisk /var/lib/asterisk/bin/module_admin installall
sudo -u asterisk /var/lib/asterisk/bin/module_admin installall
sudo -u asterisk /var/lib/asterisk/bin/retrieve_conf
sudo -u asterisk /var/lib/asterisk/bin/module_admin reload
# Install Commercial modules and reload
sudo -u asterisk /var/lib/asterisk/bin/module_admin download sysadmin
sudo -u asterisk /var/lib/asterisk/bin/module_admin install sysadmin
sudo -u asterisk /var/lib/asterisk/bin/retrieve_conf
sudo -u asterisk /var/lib/asterisk/bin/module_admin reload
sudo -u asterisk /var/lib/asterisk/bin/module_admin --repos commercial installall
sudo -u asterisk /var/lib/asterisk/bin/module_admin --repos commercial installall
sudo -u asterisk /var/lib/asterisk/bin/retrieve_conf
sudo -u asterisk /var/lib/asterisk/bin/module_admin reload
# Write out apache conf.d files
touch /var/spool/asterisk/sysadmin/portmgmt_setup
# Restart Asterisk to load all the modules.
log_info "Restart Asterisk to load all the new modules now"
/usr/local/sbin/amportal restart
sudo -u asterisk /var/lib/asterisk/bin/retrieve_conf
sudo -u asterisk /var/lib/asterisk/bin/module_admin reload
# Install iSymphony
log_info "Install iSymphony operator panel"
/usr/bin/yum -q -y install iSymphonyServer-fpbx-* freepbx-digiumaddoninstaller*
sudo -u asterisk /var/lib/asterisk/bin/retrieve_conf
sudo -u asterisk /var/lib/asterisk/bin/module_admin reload
sudo -u asterisk /var/lib/asterisk/bin/module_admin installall
sudo -u asterisk /var/lib/asterisk/bin/retrieve_conf
sudo -u asterisk /var/lib/asterisk/bin/module_admin reload
/usr/local/sbin/amportal chown
errexiton
rm -rf /tmp/*
log_info "Running 'updatedb' -- this can take a minute"
updatedb
# if we've made it to this point, things have worked (minus the error exit stuff)
# Remove the entry from firstboot
log_info "Firstboot has finished, removing firstboot script"
rm -rf /etc/pbx_first_boot.sh
sed -i '/\/etc\/pbx_first_boot.sh/d' /etc/rc.d/rc.local
log_info "This system will reboot in 10 seconds"
sleep 10
chvt ${ORIGCONSOLE}
reboot
Я его отредактировал убрав установку лишнего с моей точки зрения, забросил обратно внутрь исошки и не нервничаю.
Ну а ежели установилось с лишними модулями (например коммерческими) - то изучайте свойства команды
Код: Выделить всё
sudo -u asterisk /var/lib/asterisk/bin/module_admin
с ее помощью можно посмотреть список установленных модулей и убрать лишнее.