Only print the deprecation warning for --chuid/-c when using it

The deprecation warning has been printed when using the replecement functions as
well, bug 373243.
This commit is contained in:
Joe Harvell 2011-06-27 23:20:47 +02:00 committed by Christian Ruppert
parent e8413733c1
commit 24ba795563

View File

@ -788,12 +788,11 @@ start_stop_daemon(int argc, char **argv)
background = true;
break;
case 'u': /* --user <username>|<uid> */
case 'c': /* --chuid <username>|<uid> */
{
/* DEPRECATED */
ewarn("WARNING: -c/--chuid is deprecated and will be removed in the future, please use -u/--user instead");
case 'u': /* --user <username>|<uid> */
{
p = optarg;
tmp = strsep(&p, ":");
changeuser = xstrdup(tmp);