Re: Init script for smsd
Jan Derfinak <[email protected]> Thu, 18 Jul 2013 22:07:54 +0200 (CEST)
| Newsgroups | gmane.linux.drivers.gnokii |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 18 Jul 2013, Joan wrote:
Hello Joan.
> Hello again, does it sound familiar then? Do you want me to provide the init
> file in any special flavour so it can be included?
I have no time to look into the code but after your reminder I did.
I found that preparation of paths for configuration files is in
cfgreader.c:get_locations() function in gnokii library.
It looks that gnokii uses following paths for configuration:
$XDG_CONFIG_HOME/gnokii/config
$HOME/.config/gnokii/config
$HOME/.gnokiirc
$XDG_CONFIG_DIRS/gnokii/config (/etc/xdg)
/etc/gnokiirc
If you don't set any variable the list of paths should looks like:
/.config/gnokii/config
/.gnokiirc
/etc/xdg/gnokii/config
/etc/gnokiirc
Then in function gn_cfg_read_default is following code:
config_file_locations = get_locations(&num);
for (i = 0; i < num && error != GN_ERR_NONE; i++) {
error = gn_cfg_file_read(config_file_locations[i]);
}
So smsd should go thru the list of paths while it find the first working
path. Maybe it should be better to check result of getenv()
in get_locations() and don't use result if getenv() returns NULL, but I
think it should work anyway.
Now I don't understand you description because according code it should work
without HOME variable if you have /etc/gnokiirc.
Can you send me console output without HOME variable set?
BTW:
If you need to specify non-default config file for smsd you can use -C
(--config) option.
Regards,
Jan
>
> 2013/6/28 Joan <[email protected]>
> smsd looks for the config in $HOME/gnokii/config, usually I
> create the config in /etc/gnokiirc, and create a symlink, so
> /root/gnokii/config points to /etc/gnokiircWhen root doesn't
> have a $HOME set, smsd will look for the config
> at /gnokii/config which doesn't exists, and so it won't start.
>
>
> 2013/6/21 Jan Derfinak <[email protected]>
> On Thu, 20 Jun 2013, Joan wrote:
>
> Hello.
>
> > Hello, after some issues when migrating a system to
> debian wheezy (and
> > voyage linux) I found out that smsd dindn't start
> anymore, after digging
> > more about the issue I found out that the problem is
> because there is no
> > $HOME set when the init script is launched. So far I
> have this init script,
>
> What was the error without HOME set?
>
> Jan
>
> --
>
> _______________________________________________
> gnokii-users mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/gnokii-users
>
>
>
>
>
--
_______________________________________________
gnokii-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/gnokii-users