SOLVED pbxstatus doesn't pick up the right root fs

lrosenman

Guru
Joined
Oct 17, 2014
Messages
221
Reaction score
30
On my NUC, the first 2 mountpoints are not the root:
Code:
root@wazo:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             10M     0   10M   0% /dev
tmpfs           1.6G  9.0M  1.6G   1% /run
/dev/dm-0       102G  3.5G   93G   4% /
tmpfs           3.9G  4.0K  3.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda2       237M   83M  142M  37% /boot
/dev/sda1       511M  132K  511M   1% /boot/efi

The pbxstatus script thinks it should use the first one, but that's wrong.

I changed the script to use /$ instead of just /, and it's happier:

Code:
root@wazo:~# grep DISK /usr/local/sbin/pbxstatus
DISK=`df -h | tr -s ' ' |grep " /$" | head -n 1 | cut -f 4 -d " "`B

Could this be updated in the distro(s)?

(I'm on IPBX for WAZO).
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
We'll add it to the next release of the installer. Thanks. In the meantime, this will fix it on existing servers:
Code:
sed -i 's|grep " /"|grep " /$"|' /usr/local/sbin/pbxstatus
 

Members online

Forum statistics

Threads
25,821
Messages
167,814
Members
19,247
Latest member
mdauck
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top