summaryrefslogtreecommitdiff
path: root/src/systemd-remount-fs
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-10-21 03:19:59 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-10-21 03:19:59 -0400
commitde98d9505cd1f2b7f508088efe68cb0a95f8ef88 (patch)
treeca251db4dea3e6b0486881c8e65d9cf519fb15f0 /src/systemd-remount-fs
parent623f13d8198b83df890f014b1d27255f4d78f35b (diff)
oops
Diffstat (limited to 'src/systemd-remount-fs')
-rw-r--r--src/systemd-remount-fs/remount-fs.c48
-rw-r--r--src/systemd-remount-fs/systemd-remount-fs.service.in8
-rw-r--r--src/systemd-remount-fs/systemd-remount-fs.service.xml84
3 files changed, 70 insertions, 70 deletions
diff --git a/src/systemd-remount-fs/remount-fs.c b/src/systemd-remount-fs/remount-fs.c
index cae9248477..116c370ef7 100644
--- a/src/systemd-remount-fs/remount-fs.c
+++ b/src/systemd-remount-fs/remount-fs.c
@@ -3,7 +3,7 @@
Copyright 2010 Lennart Poettering
- systemd is free software; you can redistribute it anor modify it
+ systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
@@ -14,31 +14,31 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http/www.gnu.org/licenses/>.
-**
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
#include <errno.h>
#include <mntent.h>
#include <string.h>
-#include <syprctl.h>
-#include <systat.h>
-#include <sywait.h>
+#include <sys/prctl.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
#include <unistd.h>
-#include "systemd-basiexit-status.h"
-#include "systemd-basilog.h"
-#include "systemd-basimount-util.h"
-#include "systemd-basipath-util.h"
-#include "systemd-basiprocess-util.h"
-#include "systemd-basisignal-util.h"
-#include "systemd-basistrv.h"
-#include "systemd-basiutil.h"
+#include "basic/exit-status.h"
+#include "basic/log.h"
+#include "basic/mount-util.h"
+#include "basic/path-util.h"
+#include "basic/process-util.h"
+#include "basic/signal-util.h"
+#include "basic/strv.h"
+#include "basic/util.h"
#include "mount-setup.h"
-/* Goes throughetc/fstab and remounts all API file systems, applying
- * options that are inetc/fstab that systemd might not have
- * respected
+/* Goes through /etc/fstab and remounts all API file systems, applying
+ * options that are in /etc/fstab that systemd might not have
+ * respected */
int main(int argc, char *argv[]) {
_cleanup_hashmap_free_free_ Hashmap *pids = NULL;
@@ -57,14 +57,14 @@ int main(int argc, char *argv[]) {
umask(0022);
- f = setmntent(etc/fstab", "r");
+ f = setmntent("/etc/fstab", "r");
if (!f) {
if (errno == ENOENT) {
r = 0;
goto finish;
}
- r = log_error_errno(errno, "Failed to openetc/fstab: %m");
+ r = log_error_errno(errno, "Failed to open /etc/fstab: %m");
goto finish;
}
@@ -79,10 +79,10 @@ int main(int argc, char *argv[]) {
int k;
char *s;
- * Remount the root fs, /usr and all API VFS */
+ /* Remount the root fs, /usr and all API VFS */
if (!mount_point_is_api(me->mnt_dir) &&
- !path_equal(me->mnt_dir, ") &&
- !path_equal(me->mnt_dir, usr"))
+ !path_equal(me->mnt_dir, "/") &&
+ !path_equal(me->mnt_dir, "/usr"))
continue;
log_debug("Remounting %s", me->mnt_dir);
@@ -94,7 +94,7 @@ int main(int argc, char *argv[]) {
}
if (pid == 0) {
- * Child */
+ /* Child */
(void) reset_all_signal_handlers();
(void) reset_signal_mask();
@@ -106,7 +106,7 @@ int main(int argc, char *argv[]) {
_exit(EXIT_FAILURE);
}
- * Parent */
+ /* Parent */
s = strdup(me->mnt_dir);
if (!s) {
diff --git a/src/systemd-remount-fs/systemd-remount-fs.service.in b/src/systemd-remount-fs/systemd-remount-fs.service.in
index ffc81b2691..8d9daacaa5 100644
--- a/src/systemd-remount-fs/systemd-remount-fs.service.in
+++ b/src/systemd-remount-fs/systemd-remount-fs.service.in
@@ -1,6 +1,6 @@
# This file is part of systemd.
#
-# systemd is free software; you can redistribute it anor modify it
+# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
@@ -8,15 +8,15 @@
[Unit]
Description=Remount Root and Kernel File Systems
Documentation=man:systemd-remount-fs.service(8)
-Documentation=http/www.freedesktop.org/wiki/Software/systemd/APIFileSystems
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-fsck-root.service
Before=local-fs-pre.target local-fs.target shutdown.target
Wants=local-fs-pre.target
-ConditionPathExistsetc/fstab
+ConditionPathExists=/etc/fstab
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=@rootlibexecdirsystemd-remount-fs
+ExecStart=@rootlibexecdir@/systemd-remount-fs
diff --git a/src/systemd-remount-fs/systemd-remount-fs.service.xml b/src/systemd-remount-fs/systemd-remount-fs.service.xml
index c2e9f0c721..176f2b2d20 100644
--- a/src/systemd-remount-fs/systemd-remount-fs.service.xml
+++ b/src/systemd-remount-fs/systemd-remount-fs.service.xml
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "/OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
Copyright 2012 Lennart Poettering
- systemd is free software; you can redistribute it anor modify it
+ systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
@@ -17,72 +17,72 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http/www.gnu.org/licenses/>.
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
<refentry id="systemd-remount-fs.service">
<refentryinfo>
- <title>systemd-remount-fs.servicetitle>
- <productname>systemdproductname>
+ <title>systemd-remount-fs.service</title>
+ <productname>systemd</productname>
<authorgroup>
<author>
- <contrib>Developercontrib>
- <firstname>Lennartfirstname>
- <surname>Poetteringsurname>
- <email>lennart@poettering.netemail>
- author>
- authorgroup>
- refentryinfo>
+ <contrib>Developer</contrib>
+ <firstname>Lennart</firstname>
+ <surname>Poettering</surname>
+ <email>lennart@poettering.net</email>
+ </author>
+ </authorgroup>
+ </refentryinfo>
<refmeta>
- <refentrytitle>systemd-remount-fs.servicerefentrytitle>
- <manvolnum>8manvolnum>
- refmeta>
+ <refentrytitle>systemd-remount-fs.service</refentrytitle>
+ <manvolnum>8</manvolnum>
+ </refmeta>
<refnamediv>
- <refname>systemd-remount-fs.servicerefname>
- <refname>systemd-remount-fsrefname>
- <refpurpose>Remount root and kernel file systemsrefpurpose>
- refnamediv>
+ <refname>systemd-remount-fs.service</refname>
+ <refname>systemd-remount-fs</refname>
+ <refpurpose>Remount root and kernel file systems</refpurpose>
+ </refnamediv>
<refsynopsisdiv>
- <para><filename>systemd-remount-fs.servicefilename></para>
- <para><filenameusr/lib/systemd/systemd-remount-fs</filename></para>
- refsynopsisdiv>
+ <para><filename>systemd-remount-fs.service</filename></para>
+ <para><filename>/usr/lib/systemd/systemd-remount-fs</filename></para>
+ </refsynopsisdiv>
<refsect1>
- <title>Descriptiontitle>
+ <title>Description</title>
- <para><filename>systemd-remount-fs.servicefilename> is an
+ <para><filename>systemd-remount-fs.service</filename> is an
early boot service that applies mount options listed in
- <citerefentry project='man-pages'><refentrytitle>fstabrefentrytitle><manvolnum>5</manvolnum></citerefentry>
- to the root file system, the <filenameusr</filename> file system,
+ <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ to the root file system, the <filename>/usr</filename> file system,
and the kernel API file systems. This is required so that the
mount options of these file systems — which are pre-mounted by
the kernel, the initial RAM disk, container environments or system
manager code — are updated to those listed in
- <filenameetc/fstab</filename>. This service ignores normal file
+ <filename>/etc/fstab</filename>. This service ignores normal file
systems and only changes the root file system (i.e.
- <filename</filename>), <filename>/usr</filename> and the virtual
- kernel API file systems such as <filenameproc</filename>,
- <filenamesys</filename> or <filename>/dev</filename>. This
- service executes no operation if <filenameetc/fstab</filename>
+ <filename>/</filename>), <filename>/usr</filename> and the virtual
+ kernel API file systems such as <filename>/proc</filename>,
+ <filename>/sys</filename> or <filename>/dev</filename>. This
+ service executes no operation if <filename>/etc/fstab</filename>
does not exist or lists no entries for the mentioned file
- systems.para>
+ systems.</para>
<para>For a longer discussion of kernel API file systems see
- <ulink url="http/www.freedesktop.org/wiki/Software/systemd/APIFileSystems">API
- File Systemsulink>.</para>
- refsect1>
+ <ulink url="http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems">API
+ File Systems</ulink>.</para>
+ </refsect1>
<refsect1>
- <title>See Alsotitle>
+ <title>See Also</title>
<para>
- <citerefentry><refentrytitle>systemdrefentrytitle><manvolnum>1</manvolnum></citerefentry>,
- <citerefentry project='man-pages'><refentrytitle>fstabrefentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry project='man-pages'><refentrytitle>mountrefentrytitle><manvolnum>8</manvolnum></citerefentry>
- para>
- refsect1>
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+ </para>
+ </refsect1>
-refentry>
+</refentry>