svcs should function even if locale is missing
SMF's svcs(1M) fails if the configured locale is missing.
> LANG=cy_CY.UTF-8 svcs -xv svcs: svcs.c:346: Unexpected libscf error: invalid argument. Exiting. > LANG=C svcs -xv svc:/application/time-slider:default (GNOME Desktop Snapshot Management Service) State: maintenance since Tue Sep 7 22:44:28 2010 Reason: Start method exited with $SMF_EXIT_ERR_FATAL. See: http://sun.com/msg/SMF-8000-KS See: man -M /usr/share/man -s 1M zfs See: /var/svc/log/application-time-slider:default.log Impact: This service is not running.
I was seeing this initially with en_US.UTF-8, until I installed pkg:/locale/en, the same would apply to anyone else whose locale defaulted at install time to one we know longer have.
Updated by Vineeth Pillai over 11 years ago
- Assignee set to Vineeth Pillai
- % Done changed from 0 to 60
The issue here is that variable locale is NULL and libscf expects it not to be NULL. This is due to the following code in svcs
<snip from svcs.c>
3105 locale = setlocale(LC_MESSAGES, "");