Update the home directory for existing users

This commit is contained in:
Kalev Lember 2013-10-06 16:24:25 +02:00
parent 9d7f8fbd22
commit 2161982a86

View File

@ -58,6 +58,10 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/geoclue
%pre %pre
# Update the home directory for existing users
getent passwd geoclue >/dev/null && \
usermod -d /var/lib/geoclue geoclue &>/dev/null
# Create a new user and group if they don't exist
getent group geoclue >/dev/null || groupadd -r geoclue getent group geoclue >/dev/null || groupadd -r geoclue
getent passwd geoclue >/dev/null || \ getent passwd geoclue >/dev/null || \
useradd -r -g geoclue -d /var/lib/geoclue -s /sbin/nologin \ useradd -r -g geoclue -d /var/lib/geoclue -s /sbin/nologin \