Commit 3351fc5a authored by Mathias Ettinger's avatar Mathias Ettinger

Improve debconf question when installing packets

parent ff7ec413
......@@ -71,6 +71,7 @@ Description: Worksation identifier
Template: opensand-daemon/service/interface
Type: select
Choices: ${ifaces_list}
Default: undefined
Description: Select the interface for service publishing
The name of the interface where the service should be published.
Choose 'all' for all interfaces
......@@ -121,6 +122,7 @@ Description: OpenSAND network IPv4 address
Template: opensand-daemon/network/lan_iface
Type: select
Choices: ${ifaces_list}
Default: None
Description: Satellite Terminal network interface name
Select the physical interface for Satellite Terminal or Gateway network
This network corresponds to the sub-network used by the
......@@ -193,6 +195,7 @@ Description: Satellite Terminal terrestrial network IPv6 address
Template: opensand-daemon/network/ws_lan_iface
Type: select
Choices: ${ifaces_list}
Default: None
Description: Workstation network interface name
Select the physical interface for workstation on the Satellite Terminal network
......@@ -224,7 +227,7 @@ Description: Workstation IPv6 address
Template: opensand-daemon/network/config_level
Type: select
Default: ADVANCED
Default: AUTOMATIC
Choices: AUTOMATIC, ADVANCED
Description: Level of network configuration
Select the level of configuration you need for your network:
......
......@@ -14,13 +14,26 @@ configure(){
case "$STATE" in
1)
db_beginblock
db_input high opensand-manager/collector/ip || true
db_input high opensand-manager/collector/exists || true
db_get opensand-manager/collector/exists
HAS_COLLECTOR=${RET}
db_endblock
;;
2)
db_input high opensand-manager/collector/stats/port || true
db_beginblock
if [ "${HAS_COLLECTOR}" = "true" ]; then
db_input high opensand-manager/collector/ip || true
fi
;;
3)
db_input high opensand-manager/collector/logs/port || true
if [ "${HAS_COLLECTOR}" = "true" ]; then
db_input low opensand-manager/collector/stats/port || true
fi
;;
4)
if [ "${HAS_COLLECTOR}" = "true" ]; then
db_input low opensand-manager/collector/logs/port || true
fi
db_endblock
;;
*)
......
......@@ -22,18 +22,22 @@ set -e
update_start_cmd() {
SOURCE_FILE="/usr/lib/python2.7/dist-packages/opensand_manager_core/controller/machine.py"
db_get opensand-manager/collector/ip
COLLECTOR_IP="${RET}"
db_get opensand-manager/collector/stats/port
COLLECTOR_STATS_PORT="${RET}"
db_get opensand-manager/collector/logs/port
COLLECTOR_LOGS_PORT="${RET}"
# Update stat command
START_CMD="command_line += \" -f '/var/log/opensand/' -r ${COLLECTOR_IP} -l ${COLLECTOR_LOGS_PORT} -s ${COLLECTOR_STATS_PORT}\""
# Replace line 279 by start_cmd
sed -i "279c\ ${START_CMD}" ${SOURCE_FILE}
SOURCE_FILE="/usr/lib/python2.7/dist-packages/opensand_manager_core/controller/machine.py"
db_get opensand-manager/collector/exists
if [ "${RET}" = "true" ]; then
db_get opensand-manager/collector/ip
COLLECTOR_IP="${RET}"
db_get opensand-manager/collector/stats/port
COLLECTOR_STATS_PORT="${RET}"
db_get opensand-manager/collector/logs/port
COLLECTOR_LOGS_PORT="${RET}"
# Update stat command
START_CMD="command_line += \" -f '/var/log/opensand/' -r ${COLLECTOR_IP} -l ${COLLECTOR_LOGS_PORT} -s ${COLLECTOR_STATS_PORT}\""
else
START_CMD="command_line += \" -f '/var/log/opensand/'"
fi
# Replace line 279 by start_cmd
sed -i "279c\ ${START_CMD}" ${SOURCE_FILE}
}
case "$1" in
......
Template: opensand-manager/collector/exists
Type: boolean
Default: true
Description: Do you have a collector ?
Do you wish to send logs and probes generated by your scenarios to
an OpenSAND collector ?
Template: opensand-manager/collector/ip
Type: string
Default: localhost
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment