aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/process.c6
-rwxr-xr-xsysconfig/network-scripts/ifup-aliases2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/process.c b/src/process.c
index 739e8089..f52ade06 100644
--- a/src/process.c
+++ b/src/process.c
@@ -24,20 +24,20 @@ int forkCommand(char **args, int *outfd, int *errfd, int *cmdfd, int quiet) {
return -1;
}
- dup2(0,fdin);
+ fdin=dup(0);
if (outfd) {
fdout = outpipe[1];
*outfd = outpipe[0];
} else {
if (!quiet)
- dup2(1,fdout);
+ fdout=dup(1);
}
if (errfd) {
fderr = errpipe[1];
*errfd = errpipe[0];
} else {
if (!quiet)
- dup2(2,fderr);
+ fderr=dup(2);
}
fdcmd = fdpipe[1];
if (cmdfd)
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index 8021a3dc..55021d6c 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -40,7 +40,7 @@ else
# not have to parse linuxconf ipalias ranges, either.
allow_null_glob_expansion=foo
for alias in /etc/sysconfig/network-scripts/ifcfg-$1:* ; do
- /etc/sysconfig/network-scripts/ifup $alias
+ [ -f $alias ] && /etc/sysconfig/network-scripts/ifup $alias
done
unset allow_null_glob_expansion
fi