SOURCES: chkconfig-pl.po-update.patch (NEW), chkconfig-noxinet.pat...
glen
glen at pld-linux.org
Thu Apr 24 09:20:26 CEST 2008
Author: glen Date: Thu Apr 24 07:20:26 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- restored
---- Files affected:
SOURCES:
chkconfig-pl.po-update.patch (1.4 -> 1.5) (NEW), chkconfig-noxinet.patch (1.4 -> 1.5) (NEW), chkconfig-add.patch (1.6 -> 1.7) (NEW)
---- Diffs:
================================================================
Index: SOURCES/chkconfig-pl.po-update.patch
diff -u /dev/null SOURCES/chkconfig-pl.po-update.patch:1.5
--- /dev/null Thu Apr 24 09:20:26 2008
+++ SOURCES/chkconfig-pl.po-update.patch Thu Apr 24 09:20:20 2008
@@ -0,0 +1,216 @@
+--- chkconfig-1.2.24h/po/pl.po.orig Sun Jul 28 10:53:20 2002
++++ chkconfig-1.2.24h/po/pl.po Tue Feb 18 23:18:14 2003
+@@ -1,11 +1,12 @@
+ # t³umaczenie dla lpl.
+ # Copyright (C) 2000 Free Software Foundation, Inc.
+ # Pawe³ Niewiadomski <lilo at free.poltronic.net>, 2000.
++# Jakub Bogusz <qboosh at pld.org.pl>, 2003.
+ #
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: chkconfig\n"
+-"POT-Creation-Date: 2002-07-28 01:50-0700\n"
++"POT-Creation-Date: 2003-02-18 23:12+0100\n"
+ "PO-Revision-Date: 2000-07-03 00:00+CEST\n"
+ "Last-Translator: Pawe³ Niewiadomski <lilo at free.poltronic.net>\n"
+ "Language-Team: POLISH <pl at li.org>\n"
+@@ -13,151 +14,136 @@
+ "Content-Type: text/plain; charset=ISO-8859-2\n"
+ "Content-Transfer-Encoding: 8-bit\n"
+
+-#: chkconfig.c:41
++#: chkconfig.c:42
+ #, c-format
+ msgid "%s version %s - Copyright (C) 1997-2000 Red Hat, Inc.\n"
+-msgstr ""
++msgstr "%s wersja %s - Copyright (C) 1997-2000 Red Hat, Inc.\n"
+
+-#: chkconfig.c:42
++#: chkconfig.c:43
+ msgid ""
+ "This may be freely redistributed under the terms of the GNU Public License.\n"
+ msgstr ""
+ "Program mo¿e byæ swobodnie rozprowadzany na warunkach Publicznej Licencji "
+ "GNU.\n"
+
+-#: chkconfig.c:45
++#: chkconfig.c:46
+ #, c-format
+ msgid "usage: %s --list [name]\n"
+-msgstr "u¿ycie: %s --list [nazwa]\n"
++msgstr "sk³adnia: %s --list [nazwa]\n"
+
+-#: chkconfig.c:46
++#: chkconfig.c:47
+ #, c-format
+ msgid " %s --add <name>\n"
+-msgstr " %s --add <nazwa>\n"
++msgstr " %s --add <nazwa>\n"
+
+-#: chkconfig.c:47
++#: chkconfig.c:48
+ #, c-format
+ msgid " %s --del <name>\n"
+-msgstr " %s --del <nazwa>\n"
++msgstr " %s --del <nazwa>\n"
+
+-#: chkconfig.c:48
+-#, fuzzy, c-format
++#: chkconfig.c:49
++#, c-format
+ msgid " %s [--level <levels>] <name> %s\n"
+-msgstr " %s [--level <poziomy>] <nazwa> %s)\n"
++msgstr " %s [--level <poziomy>] <nazwa> %s\n"
+
+-#: chkconfig.c:55
++#: chkconfig.c:56
+ #, c-format
+ msgid "service %s does not support chkconfig\n"
+ msgstr "us³uga %s nie wspiera chkconfig\n"
+
+-#: chkconfig.c:57
++#: chkconfig.c:58
+ #, c-format
+ msgid "error reading information on service %s: %s\n"
+ msgstr "b³±d podczas czytania informacji o us³udze %s: %s\n"
+
+-#: chkconfig.c:122 chkconfig.c:127 chkconfig.c:227
++#: chkconfig.c:119
+ msgid "on"
+-msgstr "***"
++msgstr "tak"
+
+-#: chkconfig.c:122 chkconfig.c:127 chkconfig.c:227
++#: chkconfig.c:119
+ msgid "off"
+-msgstr "---"
++msgstr "nie"
+
+-#: chkconfig.c:159
+-#, fuzzy, c-format
++#: chkconfig.c:136
++#, c-format
+ msgid "failed to open %s: %s\n"
+-msgstr "nie mog³em otworzyæ %s/init.d: %s\n"
++msgstr "nie uda³o siê otworzyæ %s: %s\n"
+
+-#: chkconfig.c:196
+-#, fuzzy, c-format
++#: chkconfig.c:173
++#, c-format
+ msgid "error reading from directory %s: %s"
+-msgstr "b³±d podczas czytania z katalogu %s/init.d: %s\n"
+-
+-#: chkconfig.c:204
+-msgid "xinetd based services:\n"
+-msgstr ""
++msgstr "b³±d podczas czytania z katalogu %s: %s"
+
+-#: chkconfig.c:206
+-#, fuzzy, c-format
+-msgid "failed to open directory %s: %s"
+-msgstr "nie mog³em otworzyæ %s/init.d: %s\n"
+-
+-#: chkconfig.c:370
++#: chkconfig.c:310
+ #, c-format
+ msgid "%s version %s\n"
+ msgstr "%s wersja %s\n"
+
+-#: chkconfig.c:377
++#: chkconfig.c:317
+ msgid "only one of --list, --add, or --del may be specified\n"
+ msgstr "tylko jedna z opcji --list, --add, lub --del mo¿e byæ podana\n"
+
+-#: chkconfig.c:432
++#: chkconfig.c:372
+ msgid "only one runlevel may be specified for a chkconfig query\n"
+ msgstr "tylko jeden poziom pracy mo¿e byæ podany dla zapytania chkconfig\n"
+
+ #: ntsysv.c:54
+ msgid "Press <F1> for more information on a service."
+-msgstr "Naci¶nij <F1> aby dowiedzieæ siê wiêcej o us³udze."
++msgstr "Naci¶niêcie <F1> pozwoli dowiedzieæ siê wiêcej o us³udze."
+
+-#: ntsysv.c:87 ntsysv.c:124
++#: ntsysv.c:81 ntsysv.c:118
+ msgid "Ok"
+-msgstr ""
++msgstr "Ok"
+
+-#: ntsysv.c:87
++#: ntsysv.c:81
+ msgid "Back"
+ msgstr "Cofnij"
+
+-#: ntsysv.c:87
++#: ntsysv.c:81
+ msgid "Cancel"
+ msgstr "Anuluj"
+
+-#: ntsysv.c:99
++#: ntsysv.c:93
+ msgid "What services should be automatically started?"
+ msgstr "Które z us³ug powinny byæ automatycznie uruchamiane?"
+
+-#: ntsysv.c:105
++#: ntsysv.c:99
+ msgid "Services"
+ msgstr "Us³ugi"
+
+-#: ntsysv.c:199 ntsysv.c:243
++#: ntsysv.c:189
+ #, c-format
+ msgid "error reading info for service %s: %s\n"
+ msgstr "b³±d podczas odczytywania informacji o %s: %s\n"
+
+-#: ntsysv.c:208 ntsysv.c:252
+-#, fuzzy, c-format
++#: ntsysv.c:198
++#, c-format
+ msgid "error reading from directory %s: %s\n"
+-msgstr "b³±d podczas czytania z katalogu %s/init.d: %s\n"
++msgstr "b³±d podczas czytania z katalogu %s: %s\n"
+
+-#: ntsysv.c:310
++#: ntsysv.c:257
+ #, c-format
+ msgid "You must be root to run %s.\n"
+-msgstr ""
++msgstr "Trzeba byæ rootem, aby uruchomiæ %s.\n"
+
+-#: ntsysv.c:358
++#: ntsysv.c:305
+ msgid "bad argument to --levels\n"
+ msgstr "nieprawid³owy argument dla --levels\n"
+
+-#: ntsysv.c:365
++#: ntsysv.c:312
+ msgid "No services may be managed by ntsysv!\n"
+ msgstr "Brak us³ug, którymi ntsysv móg³by zarz±dzaæ!\n"
+
+-#: leveldb.c:384
++#: leveldb.c:324
+ #, c-format
+ msgid "failed to glob pattern %s: %s\n"
+-msgstr "nie mog³em dopasowaæ do wzoru %s: %s\n"
++msgstr "nie uda³o siê dopasowaæ do wzoru %s: %s\n"
+
+-#: leveldb.c:415
++#: leveldb.c:355
+ msgid "cannot determine current run level\n"
+-msgstr "nie mogê ustaliæ aktualnego poziomu pracy\n"
++msgstr "nie mo¿na ustaliæ aktualnego poziomu pracy\n"
+
+-#: leveldb.c:503
++#: leveldb.c:389
+ #, c-format
+ msgid "failed to make symlink %s: %s\n"
+-msgstr "nie powiod³a siê próba stworzenia symlinka %s: %s\n"
+-
+-#~ msgid "error reading from directory %s/init.d: %s"
+-#~ msgstr "b³±d poczas czytania z katalogu %s/init.d: %s"
+-
+-#~ msgid "error reading from directory %s/init.d: %s\n"
+-#~ msgstr "b³±d podczas czytania z katalogu %s/init.d: %s\n"
++msgstr "nie uda³o siê utworzyæ dowi±zania symbolicznego %s: %s\n"
================================================================
Index: SOURCES/chkconfig-noxinet.patch
diff -u /dev/null SOURCES/chkconfig-noxinet.patch:1.5
--- /dev/null Thu Apr 24 09:20:26 2008
+++ SOURCES/chkconfig-noxinet.patch Thu Apr 24 09:20:20 2008
@@ -0,0 +1,360 @@
+diff -Nru chkconfig-1.2.24h.orig/chkconfig.c chkconfig-1.2.24h/chkconfig.c
+--- chkconfig-1.2.24h.orig/chkconfig.c Wed Jul 17 20:10:55 2002
++++ chkconfig-1.2.24h/chkconfig.c Wed Jan 22 12:43:07 2003
+@@ -70,7 +70,6 @@
+ readServiceError(rc, name);
+ return 1;
+ }
+- if (s.type == TYPE_XINETD) return 0;
+
+ for (level = 0; level <= conf.maxlevel; level++) {
+ if (!findServiceEntries(name, level, &globres)) {
+@@ -90,8 +89,6 @@
+ readServiceError(rc, name);
+ return 1;
+ }
+-
+- if (s.type == TYPE_XINETD) return 0;
+
+ for (i = 0; i <= conf.maxlevel; i++) {
+ if (!isConfigured(name, i)) {
+@@ -118,10 +115,6 @@
+ }
+
+ printf("%-15s", s.name);
+- if (s.type == TYPE_XINETD) {
+- printf("\t%s\n", s.levels ? _("on") : _("off"));
+- return 0;
+- }
+
+ for (i = 0; i <= conf.maxlevel; i++) {
+ printf("\t%d:%s", i, isOn(s.name, i) ? _("on") : _("off"));
+@@ -131,21 +124,6 @@
+ return 0;
+ }
+
+-static int isXinetdEnabled() {
+- int i;
+- struct service s;
+-
+- if (readServiceInfo("xinetd", &s, 0)) {
+- return 0;
+- }
+- for (i = 0; i <= conf.maxlevel; i++) {
+- if (isOn("xinetd", i))
+- return 1;
+- }
+- return 0;
+-}
+-
+-
+ static int listService(char * item) {
+ DIR * dir;
+ struct dirent * ent;
+@@ -200,34 +178,6 @@
+
+ closedir(dir);
+
+- if (isXinetdEnabled()) {
+- printf(_("xinetd based services:\n"));
+- if (!(dir = opendir(conf.xinetddir))) {
+- fprintf(stderr, _("failed to open directory %s: %s"),
+- conf.xinetddir, strerror(err));
+- return 1;
+- }
+- while ((ent = readdir(dir))) {
+- const char *dn;
+- struct service s;
+-
+- /* Skip any file starting with a . */
+- if (ent->d_name[0] == '.') continue;
+-
+- /* Skip files with known bad extensions */
+- if ((dn = strrchr(ent->d_name, '.')) != NULL &&
+- (!strcmp(dn, ".rpmsave") || !strcmp(dn, ".rpmnew") || !strcmp(dn, ".rpmorig") || !strcmp(dn, ".swp")))
+- continue;
+-
+- dn = ent->d_name + strlen(ent->d_name) - 1;
+- if (*dn == '~' || *dn == ',')
+- continue;
+-
+- readXinetdServiceInfo(ent->d_name, &s, 0);
+- printf("\t%s:\t%s\n", s.name, s.levels ? _("on") : _("off"));
+- }
+- closedir(dir);
+- }
+ return 0;
+ }
+
+@@ -249,7 +199,6 @@
+ return 1;
+ }
+
+- if (s.type == TYPE_INIT_D) {
+ for (i = 0; i <= conf.maxlevel; i++) {
+ if (!((1 << i) & where)) continue;
+
+@@ -261,14 +210,6 @@
+ what = 0;
+ doSetService(s, i, what);
+ }
+- } else if (s.type == TYPE_XINETD) {
+- char xinetd[250];
+-
+- setXinetdService(s, state);
+- snprintf(xinetd, sizeof(xinetd),
+- "%s/xinetd reload >/dev/null 2>&1", conf.initdir);
+- system(xinetd);
+- }
+
+ return 0;
+ }
+diff -Nru chkconfig-1.2.24h.orig/leveldb.c chkconfig-1.2.24h/leveldb.c
+--- chkconfig-1.2.24h.orig/leveldb.c Fri Apr 19 03:15:55 2002
++++ chkconfig-1.2.24h/leveldb.c Wed Jan 22 12:46:28 2003
+@@ -140,88 +140,6 @@
+ return 0;
+ }
+
+-int readXinetdServiceInfo(char *name, struct service * service, int honorHide) {
+- char * filename = alloca(strlen(name) + strlen(XINETDDIR) + 50);
+- int fd;
+- struct service serv = { NULL, -1, -1, -1, NULL, 1, -1 };
+- struct stat sb;
+- char * buf, *ptr;
+- char * eng_desc = NULL, *start;
+-
+- snprintf(filename, strlen(name)+strlen(XINETDDIR)+50, XINETDDIR "/%s", name);
+-
+- if ((fd = open(filename, O_RDONLY)) < 0) return -1;
+- fstat(fd,&sb);
+- buf = malloc(sb.st_size+1);
+- if (read(fd,buf,sb.st_size)!=sb.st_size) {
+- close(fd);
+- free(buf);
+- return -1;
+- }
+- close(fd);
+- serv.name = strdup(name);
+- buf[sb.st_size] = '\0';
+- start = buf;
+- while (buf) {
+- ptr = strchr(buf,'\n');
+- if (*buf == '#') {
+- buf++;
+- while (isspace(*buf) && buf < ptr) buf++;
+- if (!strncmp(buf,"default:", 9)) {
+- buf+=8;
+- while(isspace(*buf)) buf++;
+- if (!strncmp(buf+9,"on",2)) {
+- serv.enabled = 1;
+- } else {
+- serv.enabled = 0;
+- }
+- } else if (!strncmp(buf,"description:",12)) {
+- buf+=11;
+- if (readDescription(buf,start+sb.st_size,
+- &serv.desc,&eng_desc)) {
+- if (serv.desc) free(serv.desc);
+- }
+- if (!serv.desc) {
+- if (eng_desc)
+- serv.desc = eng_desc;
+- } else if (eng_desc)
+- free (eng_desc);
+- }
+- if (ptr) {
+- *ptr = '\0';
+- ptr++;
+- }
+- buf = ptr;
+- continue;
+- }
+- while (isspace(*buf) && buf < ptr) buf++;
+- if (!strncmp(buf,"disable", 7)) {
+- buf = strstr(buf,"=");
+- if (buf)
+- do {
+- buf++;
+- } while(isspace(*buf));
+-
+- if (buf && strncmp(buf,"yes",3)) {
+- serv.levels = parseLevels("0123456",0);
+- if (serv.enabled == -1)
+- serv.enabled = 1;
+- } else {
+- serv.levels = 0;
+- if (serv.enabled == -1)
+- serv.enabled = 0;
+- }
+- }
+- if (ptr) {
+- *ptr = '\0';
+- ptr++;
+- }
+- buf = ptr;
+- }
+- *service = serv;
+- return 0;
+-}
+-
+ int readServiceInfo(char * name, struct service * service, int honorHide) {
+ char * filename = alloca(strlen(name) + strlen(conf.initdir) + 50);
+ int fd;
+@@ -235,7 +153,7 @@
+ sprintf(filename, "%s/%s", conf.initdir, name);
+
+ if ((fd = open(filename, O_RDONLY)) < 0) {
+- return readXinetdServiceInfo(name,service,honorHide);
++ return -1;
+ }
+ fstat(fd, &sb);
+
+@@ -427,60 +345,6 @@
+ return 1;
+ }
+
+-int setXinetdService(struct service s, int on) {
+- int oldfd, newfd;
+- char oldfname[100], newfname[100];
+- char tmpstr[50];
+- char *buf, *ptr, *tmp;
+- struct stat sb;
+-
+- if (on == -1) {
+- on = s.enabled ? 1 : 0;
+- }
+- snprintf(oldfname,100,"%s/%s",XINETDDIR,s.name);
+- if ( (oldfd = open(oldfname,O_RDONLY)) == -1 ) {
+- return -1;
+- }
+- fstat(oldfd,&sb);
+- buf = malloc(sb.st_size+1);
+- if (read(oldfd,buf,sb.st_size)!=sb.st_size) {
+- close(oldfd);
+- free(buf);
+- return -1;
+- }
+- close(oldfd);
+- buf[sb.st_size] = '\0';
+- snprintf(newfname,100,"%s/%s.XXXXXX",XINETDDIR,s.name);
+- newfd = mkstemp(newfname);
+- if (newfd == -1) {
+- free(buf);
+- return -1;
+- }
+- while (buf) {
+- tmp = buf;
+- ptr = strchr(buf,'\n');
+- if (ptr) {
+- *ptr = '\0';
+- ptr++;
+- }
+- while (isspace(*buf)) buf++;
+- if (strncmp(buf,"disable", 7) && strlen(buf)) {
+- write(newfd,tmp,strlen(tmp));
+- write(newfd,"\n",1);
+- if (buf[0] == '{') {
+- snprintf(tmpstr,50,"\tdisable\t= %s", on ? "no" : "yes");
+- write(newfd,tmpstr,strlen(tmpstr));
+- write(newfd,"\n",1);
+- }
+- }
+- buf = ptr;
+- }
+- close(newfd);
+- chmod(newfname,0644);
+- unlink(oldfname);
+- return(rename(newfname,oldfname));
+-}
+-
+ int doSetService(struct service s, int level, int on) {
+ int priority = on ? s.sPriority : s.kPriority;
+ char linkname[200];
+diff -Nru chkconfig-1.2.24h.orig/ntsysv.c chkconfig-1.2.24h/ntsysv.c
+--- chkconfig-1.2.24h.orig/ntsysv.c Sun Jul 28 10:50:04 2002
++++ chkconfig-1.2.24h/ntsysv.c Wed Jan 22 12:50:38 2003
+@@ -64,11 +64,6 @@
+ states = alloca(sizeof(*states) * numServices);
+
+ for (i = 0; i < numServices; i++) {
+- if (services[i].type == TYPE_XINETD) {
+- checkboxes[i] = newtCheckbox(-1, i, services[i].name,
+- services[i].levels ? '*' : ' ', NULL,
+- states + i);
+- } else {
+ for (j = 0; j <= conf.maxlevel; j++) {
+ if (levels & (1 << j)) {
+ if (isOn(services[i].name, j)) break;
+@@ -78,7 +73,6 @@
+ (j != (conf.maxlevel+1)) ?
+ '*' : ' ', NULL,
+ states + i);
+- }
+ newtFormAddComponent(subform, checkboxes[i]);
+ }
+
+@@ -135,13 +129,9 @@
+ if (!update) return 1;
+
+ for (i = 0; i < numServices; i++) {
+- if (services[i].type == TYPE_XINETD)
+- setXinetdService(services[i], states[i] == '*');
+- else {
+ for (j = 0; j <= conf.maxlevel; j++) {
+ if (levels & (1 << j))
+ doSetService(services[i], j, states[i] == '*');
+- }
+ }
+ }
+
+@@ -212,49 +202,6 @@
+
+ closedir(dir);
+
+- if (!stat("/usr/sbin/xinetd",&sb)) {
+- if (!(dir = opendir(conf.xinetddir))) {
+- fprintf(stderr, "failed to open %s: %s\n", conf.xinetddir,
+- strerror(errno));
+- return 2;
+- }
+-
+- while ((ent = readdir(dir))) {
+- if (strchr(ent->d_name, '~') || strchr(ent->d_name, ',') ||
+- strchr(ent->d_name, '.')) continue;
+-
+- sprintf(fn, "%s/%s", conf.xinetddir, ent->d_name);
+- if (stat(fn, &sb))
+- {
+- err = errno;
+- continue;
+- }
+- if (!S_ISREG(sb.st_mode)) continue;
+-
+- if (numServices == numServicesAlloced) {
+- numServicesAlloced += 10;
+- services = realloc(services,
+- numServicesAlloced * sizeof(*services));
+- }
+-
+- rc = readXinetdServiceInfo(ent->d_name, services + numServices, honorHide);
+-
+- if (rc == -1) {
+- fprintf(stderr, _("error reading info for service %s: %s\n"),
+- ent->d_name, strerror(errno));
+- closedir(dir);
+- return 2;
+- } else if (!rc)
+- numServices++;
+- }
+-
+- if (err) {
+- fprintf(stderr, _("error reading from directory %s: %s\n"),
+- conf.xinetddir, strerror(err));
+- return 1;
+- }
+- }
+-
+ qsort(services, numServices, sizeof(*services), serviceNameCmp);
+
+ *servicesPtr = services;
================================================================
Index: SOURCES/chkconfig-add.patch
diff -u /dev/null SOURCES/chkconfig-add.patch:1.7
--- /dev/null Thu Apr 24 09:20:26 2008
+++ SOURCES/chkconfig-add.patch Thu Apr 24 09:20:20 2008
@@ -0,0 +1,79 @@
+diff -Nru chkconfig-1.2.24h.orig/chkconfig.c chkconfig-1.2.24h/chkconfig.c
+--- chkconfig-1.2.24h.orig/chkconfig.c Wed Jul 17 20:10:55 2002
++++ chkconfig-1.2.24h/chkconfig.c Wed Jan 22 11:56:32 2003
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list