added Root Usage and Filesystem info#465
added Root Usage and Filesystem info#465DmitryHetman wants to merge 8 commits intoKittyKatt:masterfrom
Conversation
|
|
||
| # Root Usage Detection - Begin | ||
| detectrootusage(){ | ||
| root=$(df -hT -xdevtmpfs -xtmpfs|sed -n 2p|awk '{print $4 "/" $3 " " $2}') |
There was a problem hiding this comment.
The arguments for df used here are specific to GNU df and causes errors on systems that use BSD df (OS X). Should either wrap the usage of detectrootusage inside a conditional that checks that the version of df being used is part of GNU coreutils or provide a check for this inside of the detectrootusage function and provide an alternative for systems using BSD df.
There was a problem hiding this comment.
Which options exactly?
There was a problem hiding this comment.
-xdevtmpfs -xtmpfs removed
|
It's no longer GNU-specific, merge/ |
|
@DmitryHetman The -T flag means something different in BSD |
|
No! It measns add type! |
|
It looks like the FreeBSD version of BSD |
|
What return code of df -T on your system? |
|
It's ready. |
|
merge please |
fixes on detectroot
|
@k4k could complete detectroot() to provide filesystem info on macOS, but otherwise this should work on systems having POSIX |
|
This has some conflicts, let me look it over and get back to you. |
Added Root usage function.
