[MDEV-10432] Remove bash/lsof dependencies from scripts Created: 2016-07-25  Updated: 2021-08-08  Resolved: 2016-11-08

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.1.16
Fix Version/s: 10.2.3

Type: Bug Priority: Critical
Reporter: Bernard Spil Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: contribution, foundation
Environment:

FreeBSD 10.3


Issue Links:
Duplicate
is duplicated by MDEV-13758 Galera with rsync on FreeBSD broken Closed
Relates
relates to MDEV-26101 Galera WSREP SST broken under FreeBSD Closed

 Description   

The wsrep_ scripts contain a number of unneccessary bashisms and needlessly require non-base packages on FreeBSD (lsof, bash).

I've created a pull-request for this that removes some of the bashisms, uses the POSIX compat mode of bash or another POSIX compatible shell that is found in "/bin/sh" on any system.

  • Non-POSIX "${var}" == "value" -> POSIX "${var}" = "value"
  • Don't use arrays
  • split using ## and %%
  • Use alternative quotes for the FILTERS list

The `wsrep_sst_rsync.sh` script uses `lsof` to find an rsync instance that listens on the configured port. On platforms with BSD netstat that can be accomplished with netstat from the base system. Currently this checks for $OS = FreeBSD but this should work on other BSD's as well.



 Comments   
Comment by Sergey Vojtovich [ 2016-10-24 ]

Raising priority to critical since this task is around for a while.

Generated at Thu Feb 08 07:42:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.