Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 147418 Details for
Bug 225641
Merge Review: chkconfig
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
updated patch
chkconfig-1.3.33-paths.patch (text/plain), 6.37 KB, created by
Patrice Dumas
on 2007-02-05 23:29:33 UTC
(
hide
)
Description:
updated patch
Filename:
MIME Type:
Creator:
Patrice Dumas
Created:
2007-02-05 23:29:33 UTC
Size:
6.37 KB
patch
obsolete
>--- chkconfig-1.3.33/leveldb.c.paths 2007-02-06 00:09:56.000000000 +0100 >+++ chkconfig-1.3.33/leveldb.c 2007-02-06 00:10:47.000000000 +0100 >@@ -30,6 +30,10 @@ > > #define _(String) gettext((String)) > >+#ifndef BINDIR >+#define BINDIR "/sbin" >+#endif >+ > #include "leveldb.h" > > int parseLevels(char * str, int emptyOk) { >@@ -567,7 +571,7 @@ > FILE * p; > char response[50]; > >- p = popen("/sbin/runlevel", "r"); >+ p = popen(BINDIR "/runlevel", "r"); > if (!p) return -1; > > if (!fgets(response, sizeof(response), p)) { >--- chkconfig-1.3.33/leveldb.h.paths 2007-02-05 23:35:22.000000000 +0100 >+++ chkconfig-1.3.33/leveldb.h 2007-02-05 23:49:13.000000000 +0100 >@@ -11,8 +11,12 @@ > #ifndef H_LEVELDB > #define H_LEVELDB > >-#define RUNLEVELS "/etc" >-#define XINETDDIR "/etc/xinetd.d" >+#ifndef SYSCONFDIR >+#define SYSCONFDIR "/etc" >+#endif >+ >+#define RUNLEVELS SYSCONFDIR >+#define XINETDDIR SYSCONFDIR "/xinetd.d" > > #include <glob.h> > >--- chkconfig-1.3.33/ntsysv.c.paths 2007-02-06 00:25:22.000000000 +0100 >+++ chkconfig-1.3.33/ntsysv.c 2007-02-06 00:24:58.000000000 +0100 >@@ -24,6 +24,14 @@ > > #define _(String) gettext((String)) > >+#ifndef LOCALESDIR >+#define LOCALESDIR "/usr/share/locale" >+#endif >+ >+#ifndef SBINDIR >+#define SBINDIR "/usr/sbin" >+#endif >+ > #include "leveldb.h" > > /* return 1 on cancel, 2 on error, 0 on success */ >@@ -212,7 +220,7 @@ > > closedir(dir); > >- if (!stat("/usr/sbin/xinetd",&sb)) { >+ if (!stat(SBINDIR "/xinetd",&sb)) { > if (!(dir = opendir(XINETDDIR))) { > fprintf(stderr, "failed to open " XINETDDIR ": %s\n", > strerror(errno)); >@@ -279,7 +287,7 @@ > }; > > setlocale(LC_ALL, ""); >- bindtextdomain("chkconfig", "/usr/share/locale"); >+ bindtextdomain("chkconfig", LOCALESDIR); > textdomain("chkconfig"); > > progName = argv[0]; >--- chkconfig-1.3.33/chkconfig.c.paths 2007-02-05 23:35:50.000000000 +0100 >+++ chkconfig-1.3.33/chkconfig.c 2007-02-06 00:02:39.000000000 +0100 >@@ -25,6 +25,10 @@ > > #define _(String) gettext((String)) > >+#ifndef LOCALESDIR >+#define LOCALESDIR "/usr/share/locale" >+#endif >+ > #include "leveldb.h" > > static void usage(void) { >@@ -546,7 +550,7 @@ > if (setXinetdService(s, state)) { > return 1; > } >- system("/etc/init.d/xinetd reload >/dev/null 2>&1"); >+ system(SYSCONFDIR "/init.d/xinetd reload >/dev/null 2>&1"); > } > > return 0; >@@ -586,7 +590,7 @@ > } > > setlocale(LC_ALL, ""); >- bindtextdomain("chkconfig","/usr/share/locale"); >+ bindtextdomain("chkconfig",LOCALESDIR); > textdomain("chkconfig"); > > optCon = poptGetContext("chkconfig", argc, argv, optionsTable, 0); >--- chkconfig-1.3.33/alternatives.c.paths 2007-02-05 23:35:41.000000000 +0100 >+++ chkconfig-1.3.33/alternatives.c 2007-02-06 00:12:00.000000000 +0100 >@@ -26,6 +26,26 @@ > #define FL_TEST(flags) ((flags) & FLAGS_TEST) > #define FL_VERBOSE(flags) ((flags) & FLAGS_VERBOSE) > >+#ifndef SYSCONFDIR >+#define SYSCONFDIR "/etc" >+#endif >+ >+#ifndef ALTDATADIR >+#define ALTDATADIR SYSCONFDIR "/alternatives" >+#endif >+ >+#ifndef ALTDIR >+#define ALTDIR "/var/lib/alternatives" >+#endif >+ >+#ifndef LOCALESDIR >+#define LOCALESDIR "/usr/share/locale" >+#endif >+ >+#ifndef BINDIR >+#define BINDIR "/sbin" >+#endif >+ > #define _(foo) gettext(foo) > > struct linkSet { >@@ -271,7 +291,7 @@ > > while (*end && isspace(*end)) end++; > if (strlen(end)) { >- snprintf(tmppath, 500, "/etc/init.d/%s", end); >+ snprintf(tmppath, 500, SYSCONFDIR "/init.d/%s", end); > if (!stat(tmppath, &sbuf)) { > set->alts[set->numAlts].initscript = strdup(end); > } >@@ -492,8 +512,8 @@ > > if (!FL_TEST(flags)) { > if (alt->initscript) { >- path = alloca(strlen("/sbin/chkconfig --add ") + strlen(alt->initscript) + 1); >- sprintf(path, "/sbin/chkconfig --add %s", alt->initscript); >+ path = alloca(strlen(BINDIR "/chkconfig --add ") + strlen(alt->initscript) + 1); >+ sprintf(path, BINDIR "/chkconfig --add %s", alt->initscript); > if (FL_VERBOSE(flags)) > printf(_("running %s\n"), path); > system(path); >@@ -501,8 +521,8 @@ > for (i = 0; i < set->numAlts ; i++) { > struct alternative * tmpalt = set->alts + i; > if (tmpalt != alt && tmpalt->initscript) { >- path = alloca(strlen("/sbin/chkconfig --del ") + strlen(tmpalt->initscript) + 1); >- sprintf(path, "/sbin/chkconfig --del %s", tmpalt->initscript); >+ path = alloca(strlen(BINDIR "/chkconfig --del ") + strlen(tmpalt->initscript) + 1); >+ sprintf(path, BINDIR "/chkconfig --del %s", tmpalt->initscript); > if (FL_VERBOSE(flags)) > printf(_("running %s\n"), path); > system(path); >@@ -822,12 +842,12 @@ > enum programModes mode = MODE_UNKNOWN; > struct alternative newAlt = { -1, { NULL, NULL, NULL }, NULL, NULL, 0 }; > int flags = 0; >- char * altDir = "/etc/alternatives"; >- char * stateDir = "/var/lib/alternatives"; >+ char * altDir = ALTDATADIR; >+ char * stateDir = ALTDIR; > struct stat sb; > > setlocale(LC_ALL, ""); >- bindtextdomain("chkconfig","/usr/share/locale"); >+ bindtextdomain("chkconfig",LOCALESDIR); > textdomain("chkconfig"); > > if (!argv[1]) >--- chkconfig-1.3.33/Makefile.paths 2007-02-05 23:35:06.000000000 +0100 >+++ chkconfig-1.3.33/Makefile 2007-02-06 00:21:49.000000000 +0100 >@@ -11,7 +11,9 @@ > SBINDIR = /usr/sbin > MANDIR = /usr/man > ALTDIR = /var/lib/alternatives >-ALTDATADIR = /etc/alternatives >+SYSCONFDIR = /etc >+ALTDATADIR = $(SYSCONFDIR)/alternatives >+LOCALESDIR = /usr/share/locale > SUBDIRS = po > > OBJS=chkconfig.o leveldb.o >@@ -34,15 +36,16 @@ > $(CC) $(LDFLAGS) -o ntsysv $(NTOBJS) -lnewt -lpopt $(LIBMHACK) > > chkconfig.o: chkconfig.c leveldb.h >- $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c chkconfig.c >+ $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -DSYSCONFDIR=\"$(SYSCONFDIR)\" -DLOCALESDIR=\"$(LOCALESDIR)\" -c chkconfig.c > > alternatives.o: alternatives.c >- $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c alternatives.c >+ $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -DSYSCONFDIR=\"$(SYSCONFDIR)\" -DALTDATADIR=\"$(ALTDATADIR)\" -DALTDIR=\"$(ALTDIR)\" -DLOCALESDIR=\"$(LOCALESDIR)\" -DBINDIR=\"$(BINDIR)\" -c alternatives.c > > ntsysv.o: ntsysv.c leveldb.h >- $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c ntsysv.c >+ $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -DSYSCONFDIR=\"$(SYSCONFDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCALESDIR=\"$(LOCALESDIR)\" -c ntsysv.c > > leveldb.o: leveldb.c leveldb.h >+ $(CC) $(CFLAGS) -DBINDIR=\"$(BINDIR)\" -c leveldb.c > > clean: > rm -f chkconfig ntsysv $(OBJS) $(NTOBJS)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 225641
:
147417
| 147418