Remove `-f` option from `groupdel` in uninstaller. (#7507)
The `-f` option forces removal of a group even if it is the primary group for a user. We should not be using this option for three ons: * It's not universally supported. Gentoo, for example, does not ide a version of `groupdel` with this option. * We shouldn't need it. Short of unusual user configurations, the `netdata` user should be the only one who has a primary group of `netdata`, and we remove the `netdata` user before trying to remove `netdata` group. * In the unlikely event that the above point is not the case on a given system, removing the `netdata` group will actually break things. Fixes: #6348
Austin S. Hemmelgarn committed
Dec 13, 2019 at 07:37 UTC
757ce94f16260ef0054a31770939f20894967519
1 file changed
+1
-1
packaging/installer/netdata-uninstaller.sh
+1
-1
@@ -159,7 +159,7 @@ portable_del_group() {
159
# Linux
160
if command -v groupdel 1>/dev/null 2>&1; then
161
if grep -q "${groupname}" /etc/group; then
162
- run groupdel -f "${groupname}" && return 0
162
+ run groupdel "${groupname}" && return 0
163
else
164
echo >&2 "Group ${groupname} already removed in a previous step."
165
run_ok