Handle fstab with spaces
This commit is contained in:
parent
8a7b58a73d
commit
e24d808fc5
@ -68,7 +68,7 @@ mount_svcdir() {
|
||||
cp -p "${RC_SVCDIR}"/deptree "${RC_SVCDIR}"/depconfig \
|
||||
"${RC_SVCDIR}"/nettree "${RC_LIBDIR}"/tmp 2>/dev/null
|
||||
fi
|
||||
try mount -n ${mntcmd}
|
||||
eval try mount -n ${mntcmd}
|
||||
if ${dotmp} ; then
|
||||
cp -p "${RC_LIBDIR}"/tmp/deptree "${RC_LIBDIR}"/tmp/depconfig \
|
||||
"${RC_LIBDIR}"/tmp/nettree "${RC_SVCDIR}" 2>/dev/null
|
||||
@ -122,7 +122,7 @@ if ${mountproc} ; then
|
||||
[ "${RC_UNAME}" = "GNU/kFreeBSD" ] && proc="linprocfs"
|
||||
ebegin "Mounting ${procfs} at /proc"
|
||||
mntcmd="$(fstabinfo --mountcmd /proc)"
|
||||
try mount -n ${mntcmd:--t ${procfs} -o noexec,nosuid,nodev proc /proc}
|
||||
eval try mount -n ${mntcmd:--t ${procfs} -o noexec,nosuid,nodev proc /proc}
|
||||
eend $?
|
||||
fi
|
||||
unset mountproc
|
||||
@ -143,7 +143,7 @@ if [ "${RC_UNAME}" != "GNU/kFreeBSD" -a "${RC_SYS}" != "VPS" -a "${K26}" = "0" ]
|
||||
if ! mountinfo --quiet /sys ; then
|
||||
ebegin "Mounting sysfs at /sys"
|
||||
mntcmd="$(fstabinfo --mountcmd /sys)"
|
||||
try mount -n ${mntcmd:--t sysfs -o noexec,nosuid,nodev sysfs /sys}
|
||||
eval try mount -n ${mntcmd:--t sysfs -o noexec,nosuid,nodev sysfs /sys}
|
||||
eend $?
|
||||
fi
|
||||
else
|
||||
@ -212,7 +212,7 @@ if grep -Eq "[[:space:]]+devpts$" /proc/filesystems && \
|
||||
if [ -d /dev/pts ] ; then
|
||||
ebegin "Mounting devpts at /dev/pts"
|
||||
mntcmd="$(fstabinfo --mountcmd /dev/pts)"
|
||||
try mount -n ${mntcmd:--t devpts -o gid=5,mode=0620,noexec,nosuid devpts /dev/pts}
|
||||
eval try mount -n ${mntcmd:--t devpts -o gid=5,mode=0620,noexec,nosuid devpts /dev/pts}
|
||||
eend $?
|
||||
fi
|
||||
fi
|
||||
|
@ -186,8 +186,8 @@ int fstabinfo (int argc, char **argv)
|
||||
|
||||
switch (output) {
|
||||
case OUTPUT_MOUNTCMD:
|
||||
printf ("-o %s -t %s %s %s\n", ENT_OPTS (ent), ENT_TYPE (ent),
|
||||
ENT_DEVICE (ent), ENT_FILE (ent));
|
||||
printf ("-o %s -t %s '%s' '%s'\n", ENT_OPTS (ent),
|
||||
ENT_TYPE (ent), ENT_DEVICE (ent), ENT_FILE (ent));
|
||||
break;
|
||||
|
||||
case OUTPUT_OPTIONS:
|
||||
|
@ -161,7 +161,7 @@ int rc_update (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
verbose = rc_is_env ("RC_VERBOSE", "yes");
|
||||
verbose = rc_env_bool ("RC_VERBOSE");
|
||||
|
||||
if ((action & DOSHOW && action != DOSHOW) ||
|
||||
(action & DOADD && action != DOADD) ||
|
||||
|
@ -685,7 +685,7 @@ int start_stop_daemon (int argc, char **argv)
|
||||
}
|
||||
|
||||
quiet = rc_env_bool ("RC_QUIET");
|
||||
verbose = rc_is_env ("RC_VERBOSE", "yes");
|
||||
verbose = rc_env_bool ("RC_VERBOSE");
|
||||
|
||||
/* Allow start-stop-daemon --signal HUP --exec /usr/sbin/dnsmasq
|
||||
* instead of forcing --stop --oknodo as well */
|
||||
|
Loading…
Reference in New Issue
Block a user