Репозитории ALT
S: | 1.9.5-alt1 |
D: | 1.9-alt0.1 |
5.1: | 1.9.2-alt3 |
4.1: | 1.9.1-alt1 |
4.0: | 1.9-alt1 |
3.0: | 1.6e-alt1 |
Группа :: Звук
Пакет: nas
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: nas-1.9.1-pidfile.patch
Скачать
Скачать
diff -urN nas-1.9.1.orig/server/dia/main.c nas-1.9.1/server/dia/main.c
--- nas-1.9.1.orig/server/dia/main.c 2007-06-16 22:03:22 +0300
+++ nas-1.9.1/server/dia/main.c 2007-11-12 17:49:24 +0200
@@ -148,7 +148,8 @@
osBecomeDaemon();
/* we could store pid info here... */
- /* osStorePid() */
+ if (NasConfig.PidFile)
+ osStorePid();
}
/* And cd to / so we don't hold anything up; core files will also
diff -urN nas-1.9.1.orig/server/dia/nasconf.h nas-1.9.1/server/dia/nasconf.h
--- nas-1.9.1.orig/server/dia/nasconf.h 2007-06-16 22:03:22 +0300
+++ nas-1.9.1/server/dia/nasconf.h 2007-11-12 17:49:24 +0200
@@ -24,6 +24,7 @@
int DoDaemon;
int LocalOnly;
int AllowAny;
+ int PidFile;
} NasConfig_t;
GEXTERN NasConfig_t NasConfig;
diff -urN nas-1.9.1.orig/server/nasd.man nas-1.9.1/server/nasd.man
--- nas-1.9.1.orig/server/nasd.man 2007-06-16 22:03:22 +0300
+++ nas-1.9.1/server/nasd.man 2007-11-12 17:53:10 +0200
@@ -56,6 +56,8 @@
.TP 8
.B \-b
Fork a child to run in the background and exit (daemon mode).
+.B \-p
+Create /var/run/nasd.pid.
.TP 8
.B \-d \fIn\fP
Enable debugging output at level \fIn\fP, where \fIn\fP is a positive
diff -urN nas-1.9.1.orig/server/os/utils.c nas-1.9.1/server/os/utils.c
--- nas-1.9.1.orig/server/os/utils.c 2007-06-16 22:03:21 +0300
+++ nas-1.9.1/server/os/utils.c 2007-11-12 17:52:05 +0200
@@ -238,6 +238,7 @@
ErrorF(" -aa allow any client to connect\n");
ErrorF(" -local allow local clients only\n");
ErrorF(" -b detach and run in background\n");
+ ErrorF(" -p create /var/run/nasd.pid\n");
ErrorF(" -v enable verbose messages\n");
ErrorF(" -d <num> enable debug messages at level <num>\n");
ErrorF(" -config <file> use <file> as the nasd config file\n");
@@ -331,6 +332,8 @@
}
} else if (strcmp(argv[i], "-b") == 0) {
NasConfig.DoDaemon = TRUE;
+ } else if (strcmp(argv[i], "-p") == 0) {
+ NasConfig.PidFile = TRUE;
} else if (strcmp(argv[i], "-V") == 0) { /* print version and exit */
printf("%s\n", release);
exit(0);