diff --git a/fwnn.changes b/fwnn.changes index 4543e2f..9308839 100644 --- a/fwnn.changes +++ b/fwnn.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 15 21:24:15 UTC 2019 - Jan Engelhardt + +- Do not hide errors coming from useradd. + ------------------------------------------------------------------- Sat Mar 9 07:51:43 UTC 2019 - bkbin005@rinku.zaq.ne.jp diff --git a/fwnn.spec b/fwnn.spec index 6e1899c..7aca4bf 100644 --- a/fwnn.spec +++ b/fwnn.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -287,7 +287,9 @@ find %{buildroot} -type f -name "*.a" -delete -print %pre -n fwnn %service_add_pre fwnn.service -%{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn 2> /dev/null || : +getent passwd wnn >/dev/null || \ + %{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false \ + -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn %post -n fwnn %service_add_post fwnn.service @@ -309,14 +311,20 @@ chroot . usr/bin/wnntouch var/lib/wnn/ja/dic/pubdic/*.* %postun -n libwnn0 -p /sbin/ldconfig %pre -n fwnncom -%{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn 2> /dev/null || : +getent passwd wnn >/dev/null || \ + %{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false \ + -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn %pre -n fcwnncom -%{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn 2> /dev/null || : +getent passwd wnn >/dev/null || \ + %{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false \ + -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn %pre -n fcwnn %service_add_pre fcwnn.service -%{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn 2> /dev/null || : +getent passwd wnn >/dev/null || \ + %{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false \ + -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn %preun -n fcwnn %service_del_preun fcwnn.service @@ -337,7 +345,9 @@ chroot . usr/bin/cwnntouch var/lib/wnn/zh_CN/dic/sys/*.* %pre -n ftwnn %service_add_pre ftwnn.service -%{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn 2> /dev/null || : +getent passwd wnn >/dev/null || \ + %{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false \ + -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn %preun -n ftwnn %service_del_preun ftwnn.service @@ -355,7 +365,9 @@ chroot . usr/bin/cwnntouch var/lib/wnn/zh_TW/dic/sys/*.* %pre -n fkwnn %service_add_pre fkwnn.service -%{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn 2> /dev/null || : +getent passwd wnn >/dev/null || \ + %{_sbindir}/useradd -r -o -g root -u 66 -s /bin/false \ + -c "Wnn System Account" -d %{_localstatedir}/lib/wnn wnn %preun -n fkwnn %service_del_preun fkwnn.service