Skip to content

Commit e131cb3

Browse files
committed
Implemented CORE-5238: Replace xinetd support with the native listener
1 parent ca24b62 commit e131cb3

12 files changed

+20
-232
lines changed

builds/install/arch-specific/linux/firebird-classic.service.in

Lines changed: 0 additions & 10 deletions
This file was deleted.

builds/install/arch-specific/linux/firebird-classic.socket.in

Lines changed: 0 additions & 11 deletions
This file was deleted.

builds/install/arch-specific/linux/firebird.init.d.slackware.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# /etc/rc.d/rc.firebirdss
44
#
5-
# Start/stop/restart the firebird super server.
5+
# Start/stop/restart the firebird server.
66
#
77

88
fb_install_prefix=@prefix@

builds/install/arch-specific/linux/firebird.init.d.suse.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
# /usr/sbin/rcfirebird
1111
#
12-
# System startup script for the Firebird SuperServer
12+
# System startup script for the Firebird Server
1313
#
1414
### BEGIN INIT INFO
1515
# Provides: firebird

builds/install/arch-specific/linux/firebird-superserver.service.in renamed to builds/install/arch-specific/linux/firebird.service.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[Unit]
2-
Description=Firebird Database Server ( SuperServer )
2+
Description=Firebird Database Server
33
After=syslog.target network.target
4-
Conflicts=firebird-classic.socket
54

65
[Service]
76
User=firebird

builds/install/arch-specific/linux/firebird.xinetd.in

Lines changed: 0 additions & 17 deletions
This file was deleted.

builds/install/arch-specific/linux/linuxLibrary.sh.in

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ getInitScriptLocation() {
111111
# register/start/stop server using systemd
112112

113113
SYSTEMCTL=systemctl
114-
CLASSIC_CTRL=${fb_startup_name}-classic.socket
115-
SUPER_CTRL=${fb_startup_name}-superserver.service
114+
CTRL=${fb_startup_name}.service
116115
SYSTEMD_DIR=/usr/lib/systemd/system
117116
[ -d $SYSTEMD_DIR ] || SYSTEMD_DIR=/lib/systemd/system
118117
TMPFILE_CONF=/usr/lib/tmpfiles.d/firebird.conf
@@ -140,13 +139,9 @@ installSystemdCtrlFiles() {
140139
exit 1
141140
fi
142141

143-
editFile "@FB_MISCDIR@/firebird-superserver.service" ExecStart "ExecStart=${fb_install_prefix}/bin/fbguard -pidfile $PidDir/${fb_startup_name}.pid -daemon -forever"
144-
editFile "@FB_MISCDIR@/firebird-superserver.service" PIDFile "PIDFile=$PidDir/${fb_startup_name}.pid"
145-
editFile "@FB_MISCDIR@/[email protected]" ExecStart "ExecStart=${fb_install_prefix}/bin/firebird"
146-
147-
cp @FB_MISCDIR@/firebird-superserver.service "${SYSTEMD_DIR}/${fb_startup_name}-superserver.service"
148-
cp @FB_MISCDIR@/[email protected] "${SYSTEMD_DIR}/${fb_startup_name}[email protected]"
149-
cp @FB_MISCDIR@/firebird-classic.socket "${SYSTEMD_DIR}/${fb_startup_name}-classic.socket"
142+
editFile "@FB_MISCDIR@/firebird.service" ExecStart "ExecStart=${fb_install_prefix}/bin/fbguard -pidfile $PidDir/${fb_startup_name}.pid -daemon -forever"
143+
editFile "@FB_MISCDIR@/firebird.service" PIDFile "PIDFile=$PidDir/${fb_startup_name}.pid"
144+
cp @FB_MISCDIR@/firebird.service "${SYSTEMD_DIR}/${fb_startup_name}.service"
150145

151146
mkdir -p ${PidDir}
152147
chown $RunUser:$RunGroup ${PidDir}
@@ -156,7 +151,7 @@ installSystemdCtrlFiles() {
156151
}
157152

158153
osRemoveStartupFiles() {
159-
rm -f ${SYSTEMD_DIR}/${fb_startup_name}-*
154+
rm -f ${SYSTEMD_DIR}/${fb_startup_name}.*
160155
rm -f ${TMPFILE_CONF}
161156
}
162157

@@ -180,33 +175,10 @@ systemdSrv() {
180175
return 1
181176
}
182177

183-
classicSrv() {
184-
op=${1}
185-
186-
systemdSrv ${op} ${CLASSIC_CTRL}
187-
}
188-
189178
superSrv() {
190179
op=${1}
191180

192-
systemdSrv ${op} ${SUPER_CTRL}
193-
}
194-
195-
osRegisterClassicServer() {
196-
installSystemdCtrlFiles
197-
classicSrv enable
198-
}
199-
200-
osUnregisterClassicServer() {
201-
classicSrv disable
202-
}
203-
204-
osStartClassicServer() {
205-
classicSrv start
206-
}
207-
208-
osStopClassicServer() {
209-
classicSrv stop
181+
systemdSrv ${op} ${CTRL}
210182
}
211183

212184
registerSuperServer() {
@@ -236,9 +208,6 @@ stopSuperServer() {
236208
}
237209

238210

239-
# Additional OS settings
240-
systemdPresent && OS_Has_Specific_Classic_Startup=yes
241-
242211

243212
#------------------------------------------------------------------------
244213
# stop super server if it is running
@@ -493,7 +462,7 @@ removeServiceAutostart() {
493462

494463
standaloneServerInstalled() {
495464
if systemdPresent; then
496-
${SYSTEMCTL} --quiet is-enabled ${SUPER_CTRL} && return 0
465+
${SYSTEMCTL} --quiet is-enabled ${CTRL} && return 0
497466
return 1
498467
fi
499468

builds/install/arch-specific/linux/makeInstallImage.sh.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,9 @@ copyFiles() {
285285
#misc
286286
cp $BuildRootDir/src/misc/intl.sql ${TargetDir}@FB_MISCDIR@
287287
cp $BuildRootDir/src/misc/upgrade/v3.0/security_database* ${TargetDir}@FB_MISCDIR@/upgrade/security
288-
cp $BuildRootDir/gen/install/misc/firebird.xinetd ${TargetDir}@FB_MISCDIR@
289288
cp $BuildRootDir/gen/install/misc/firebird.init.d.* ${TargetDir}@FB_MISCDIR@
290289
cp $BuildRootDir/gen/install/misc/rc.config.firebird ${TargetDir}@FB_MISCDIR@
291-
cp $BuildRootDir/gen/install/misc/firebird-* ${TargetDir}@FB_MISCDIR@
290+
cp $BuildRootDir/gen/install/misc/firebird.service ${TargetDir}@FB_MISCDIR@
292291

293292
chmod -R go-rwx ${TargetDir}@FB_MISCDIR@
294293

builds/install/posix-common/FirebirdUninstall.sh.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ done
6969

7070
removeLinksForBackCompatibility
7171
removeServiceAutostart
72-
removeInetdServiceEntry
7372

7473
if [ -d $PidDir ]
7574
then
@@ -82,9 +81,4 @@ removeInstalledFiles # Remove installed files
8281
removeUninstallFiles # Remove the 'uninstall' utility files
8382
removeEmptyDirs # Remove empty directories
8483

85-
if [ "$OS_Has_Specific_Classic_Startup" ]
86-
then
87-
osRemoveStartupFiles
88-
fi
89-
9084
displayMessage "Uninstall completed"

builds/install/posix-common/changeServerMode.sh.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ cat <<EOF
2727
Firebird server may run in 2 different modes - super and classic.
2828
Super server provides better performance, classic - better availability.
2929
30+
*******************************************************
31+
* This script is deprecated and will be removed soon: *
32+
* edit firebird.conf directly instead. *
33+
*******************************************************
34+
3035
EOF
3136

3237
AskQuestion "Which option would you like to choose: (super|classic) [super] " "super"
@@ -51,22 +56,17 @@ esac
5156

5257
echo "Stopping currently running engine..."
5358
checkIfServerRunning
54-
removeInetdServiceEntry
55-
removeServiceAutostart
5659

5760
sc=Starting
5861
[ ${fb_install_prefix} = ${default_prefix} ] || sc=Configure
5962
echo "$sc firebird in $multiAnswer server mode..."
6063
fbconf="@FB_CONFDIR@/firebird.conf"
6164
if [ $multiAnswer = classic ]; then
6265
replaceLineInFile $fbconf "ServerMode = Classic" "^ServerMode"
63-
64-
updateInetdServiceEntry
6566
else
6667
replaceLineInFile $fbconf "ServerMode = Super" "^ServerMode"
67-
68-
installInitdScript
6968
fi
69+
7070
startFirebird
7171

7272
echo "Done."

0 commit comments

Comments
 (0)