File: iconfig

package info (click to toggle)
sysstat 12.7.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,156 kB
  • sloc: ansic: 49,310; sh: 1,388; xml: 1,285; makefile: 768; tcl: 756; python: 277; perl: 257
file content (277 lines) | stat: -rwxr-xr-x 7,945 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
#!/bin/sh
#@(#) Configuration script for sysstat
# (C) 2000-2023 Sebastien GODARD (sysstat <at> orange.fr)

if [ "$1" = "xlocal" ]
then
	echo
	echo -n "./configure sa_lib_dir=. sa_dir=. conf_dir=. conf_file=sysstat.sysconfig"
	echo
	./configure sa_lib_dir=. sa_dir=. sar_dir=. conf_dir=. conf_file=sysstat.sysconfig
	exit
elif [ "$1" = "local" ]
then
	# This mode is just to make sure that sar will call sadc located in current directory
	echo
	echo -n "./configure sa_lib_dir=."
	echo
	./configure sa_lib_dir=.
	exit
elif [ "$1" = "debug" ]
then
	echo
	echo -n "./configure sa_lib_dir=. --enable-debuginfo --disable-stripping"
	echo
	./configure sa_lib_dir=. --enable-debuginfo --disable-stripping
	exit
fi

ASK="sh build/Ask.sh"

echo ; echo
echo Welcome to sysstat\'s  Interactive Configuration script!
echo
echo This script enables you to set the parameters value used by ./configure.
echo Please enter the value for the parameters listed below.
echo Press Return to tell ./configure to use the default value or to try to guess the proper one.
echo "Default value for yes/no questions is no (parameter is NOT set)."
echo You can enter a ? to display a help message at any time...
echo

# Syntax: Ask <QUESTION> <PARM> <TEXT_FILE>

# Installation directory
PREFIX=`${ASK} 'Installation directory:' "--prefix" "prefix"`
if [ "${PREFIX}" != "" ]; then
	PREFIX="--prefix=${PREFIX} "
fi

# sadc directory
SA_LIB_DIR=`${ASK} 'sadc directory:' "sa_lib_dir" "sa_lib_dir"`
if [ "${SA_LIB_DIR}" != "" ]; then
	SA_LIB_DIR="sa_lib_dir=${SA_LIB_DIR} "
fi

# System Activity directory
SA_DIR=`${ASK} 'System activity directory:' "sa_dir" "sa_dir"`
if [ "${SA_DIR}" != "" ]; then
	SA_DIR="sa_dir=${SA_DIR} "
fi

# sysstat configuration directory
SYSCONFIG_DIR=`${ASK} 'sysstat configuration directory:' "conf_dir" "conf_dir"`
if [ "${SYSCONFIG_DIR}" != "" ]; then
	SYSCONFIG_DIR="conf_dir=${SYSCONFIG_DIR} "
fi

# sysstat configuration file
SYSCONFIG_FILE=`${ASK} 'sysstat configuration file:' "conf_file" "conf_file"`
if [ "${SYSCONFIG_FILE}" != "" ]; then
	SYSCONFIG_FILE="conf_file=${SYSCONFIG_FILE} "
fi

# Clean sa directory
CLEAN_SA_DIR=`${ASK} 'Clean system activity directory? (y/n)' "--enable-clean-sa-dir" "clean-sa-dir"`
if [ "${CLEAN_SA_DIR}" = "y" ]; then
	CLEAN_SA_DIR="--enable-clean-sa-dir "
else
	CLEAN_SA_DIR=""
	echo "Parameter --enable-clean-sa-dir is NOT set"
fi

# National Language Support
NLS=`${ASK} 'Disable National Language Support (NLS)? (y/n)' "--disable-nls" "nls"`
if [ "${NLS}" = "y" ]; then
	NLS="--disable-nls "
else
	NLS=""
	echo "Parameter --disable-nls is NOT set"
fi

# Link Time Optimization support
LTO=`${ASK} 'Compile with Link Time Optimizations (LTO)? (y/n)' "--enable-lto" "lto"`
if [ "${LTO}" = "y" ]; then
	LTO="--enable-lto "
else
	LTO=""
	echo "Parameter --enable-lto is NOT set"
fi

# Sensors support
SENSORS=`${ASK} 'Disable sensors support? (y/n)' "--disable-sensors" "sensors"`
if [ "${SENSORS}" = "y" ]; then
	SENSORS="--disable-sensors "
else
	SENSORS=""
	echo "Parameter --disable-sensors is NOT set"
fi

# PCP support
PCP=`${ASK} 'Disable PCP support? (y/n)' "--disable-pcp" "pcp"`
if [ "${PCP}" = "y" ]; then
	PCP="--disable-pcp "
else
	PCP=""
	echo "Parameter --disable-pcp is NOT set"
fi

# Data history to keep by sa2
HISTORY=`${ASK} 'Number of daily data files to keep:' "history" "history"`
if [ "${HISTORY}" != "" ]; then
	HISTORY="history=${HISTORY} "
fi

# Random delay before sa2 script generates its reports files
DELAY_RANGE=`${ASK} 'Maximum delay in seconds to wait before sa2 script runs:' "delay_range" "delay_range"`
if [ "${DELAY_RANGE}" != "" ]; then
	DELAY_RANGE="delay_range=${DELAY_RANGE} "
fi

# Delay after which datafiles are to be compressed
COMPRESSAFTER=`${ASK} 'Number of days after which sar datafiles must be compressed:' "compressafter" "compressafter"`
if [ "${COMPRESSAFTER}" != "" ]; then
	COMPRESSAFTER="compressafter=${COMPRESSAFTER} "
fi

# Manual page group
MAN=`${ASK} 'Group for manual pages:' "man_group" "man_group"`
if [ "${MAN}" != "" ]; then
	MAN="man_group=${MAN} "
fi

# Don't set attributes on files being installed
IGNORE_FILE_ATTR=`${ASK} 'Do not set attributes on files being installed? (y/n)' "--disable-file-attr" "ignore-file-attr"`
if [ "${IGNORE_FILE_ATTR}" = "y" ]; then
	IGNORE_FILE_ATTR="--disable-file-attr "
else
	IGNORE_FILE_ATTR=""
	echo "Parameter --disable-file-attr is NOT set"
fi

# Crontab
CRON=`${ASK} 'Set crontab to start sar automatically? (y/n)' "--enable-install-cron" "install-cron"`
if [ "${CRON}" = "y" ]; then
	CRON="--enable-install-cron "
else
	CRON=""
	echo "Parameter --enable-install-cron is NOT set"
fi

if [ "${CRON}" != "" ];
then
	CRON_OWNER=`${ASK} 'Crontab owner:' "cron_owner" "cron_owner"`
	if [ "${CRON_OWNER}" != "" ]; then
		CRON="${CRON}cron_owner=${CRON_OWNER} "
	fi
fi

if [ "${CRON}" != "" ];
then
	USE_CROND=`${ASK} 'Use standard cron daemon? (y/n)' "--enable-use-crond" "use-crond"`
	if [ "${USE_CROND}" = "y" ]; then
		USE_CROND="--enable-use-crond "
	else
		USE_CROND=""
		echo "Parameter --enable-use-crond is NOT set"
	fi
fi

if [ "${CRON}" != "" ];
then
	CRON_INTERVAL=`${ASK} 'Crontab sampling interval (in minutes):' "cron_interval" "cron_interval"`
	if [ "${CRON_INTERVAL}" != "" ]; then
		CRON="${CRON}cron_interval=${CRON_INTERVAL} "
	fi
fi

if [ "${CRON}" != "" ];
then
	COLL_ALL=`${ASK} 'Should sadc collect optional activities? (y/n)' "--enable-collect-all" "collect-all"`
	if [ "${COLL_ALL}" = "y" ]; then
		CRON="${CRON}--enable-collect-all "
	else
		echo "Parameter --enable-collect-all is NOT set"
	fi
fi

if [ "${CRON}" != "" -a "${COLL_ALL}" != "y" ];
then
	# Optional args for sadc
	SADC_OPT=`${ASK} 'Options to be passed to sadc:' "sadc_options" "sadc_options"`
else
	SADC_OPT=
fi

if [ "${CRON}" != "" ];
then
	# rc directory
	RCDIR=`${ASK} 'rc directory:' "rcdir" "rcdir"`
	if [ "${RCDIR}" != "" ]; then
	        RCDIR="rcdir=${RCDIR} "
	fi
fi

if [ "${CRON}" != "" ];
then
	# Only copy files
	COPY_ONLY=`${ASK} 'Only copy files when installing sysstat? (y/n)' "--enable-copy-only" "copy-only"`
	if [ "${COPY_ONLY}" = "y" ]; then
		COPY_ONLY="--enable-copy-only "
	else
		COPY_ONLY=""
		echo "Parameter --enable-copy-only is NOT set"
	fi
fi

# Compress manual pages
COMPRESSMANPG=`${ASK} 'Do not compress manual pages? (y/n)' "--disable-compress-manpg" "compress-manpg"`
if [ "${COMPRESSMANPG}" = "y" ]; then
	COMPRESSMANPG="--disable-compress-manpg "
else
	COMPRESSMANPG=""
	echo "Parameter --disable-compress-manpg is NOT set"
fi

# Install documentation
INSTALL_DOC=`${ASK} 'Skip documentation installation? (y/n)' "--disable-documentation" "install-doc"`
if [ "${INSTALL_DOC}" = "y" ]; then
	INSTALL_DOC="--disable-documentation "
else
	INSTALL_DOC=""
	echo "Parameter --disable-documentation is NOT set"
fi

# Debug mode
DEBUGINFO=`${ASK} 'Debug mode support? (y/n)' "--enable-debuginfo" "debuginfo"`
if [ "${DEBUGINFO}" = "y" ]; then
	DEBUGINFO="--enable-debuginfo "
else
	DEBUGINFO=""
	echo "Parameter --enable-debuginfo is NOT set"
fi

# Strip object files
STRIP=`${ASK} 'Do not strip object files? (y/n)' "--disable-stripping" "stripping"`
if [ "${STRIP}" = "y" ]; then
	STRIP="--disable-stripping "
else
	STRIP=""
	echo "Parameter --disable-stripping is NOT set"
fi

echo
echo -n "./configure ${PREFIX}${SA_LIB_DIR}${SA_DIR}${SYSCONFIG_DIR}${SYSCONFIG_FILE} \
${CLEAN_SA_DIR}${NLS}${LTO}${HISTORY}${DELAY_RANGE}${COMPRESSAFTER}${MAN}${IGNORE_FILE_ATTR} \
${CRON}${USE_CROND}${RCDIR}"
if [ "${SADC_OPT}" != "" ];
then
	echo -n "sadc_options=\"${SADC_OPT}\""
fi
echo "${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${SENSORS}${PCP}${STRIP}${COPY_ONLY}"
echo

./configure ${PREFIX}${SA_LIB_DIR}${SA_DIR}${SYSCONFIG_DIR}${SYSCONFIG_FILE} \
${CLEAN_SA_DIR}${NLS}${LTO} \
${HISTORY}${DELAY_RANGE}${COMPRESSAFTER}${MAN}${IGNORE_FILE_ATTR}${CRON}${USE_CROND}${RCDIR} \
sadc_options="${SADC_OPT}" ${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${SENSORS} \
${PCP}${STRIP}${COPY_ONLY}