chiark / gitweb /
generators: add Documentation= fields that point to the generator man pages
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Mar 2014 17:26:06 +0000 (18:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 6 Mar 2014 17:48:22 +0000 (18:48 +0100)
src/cryptsetup/cryptsetup-generator.c
src/dbus1-generator/dbus1-generator.c
src/efi-boot-generator/efi-boot-generator.c
src/fstab-generator/fstab-generator.c
src/gpt-auto-generator/gpt-auto-generator.c

index 9460e83..75d56dd 100644 (file)
@@ -121,7 +121,7 @@ static int create_disk(
                 "# Automatically generated by systemd-cryptsetup-generator\n\n"
                 "[Unit]\n"
                 "Description=Cryptography Setup for %I\n"
-                "Documentation=man:systemd-cryptsetup@.service(8) man:crypttab(5)\n"
+                "Documentation=man:crypttab(5) man:systemd-cryptsetup-generator(8) man:systemd-cryptsetup@.service(8)\n"
                 "SourcePath=/etc/crypttab\n"
                 "DefaultDependencies=no\n"
                 "Conflicts=umount.target\n"
index b1c94c2..a7b36d1 100644 (file)
@@ -66,7 +66,8 @@ static int create_dbus_files(
                         "# Automatically generated by systemd-dbus1-generator\n\n"
                         "[Unit]\n"
                         "SourcePath=%s\n"
-                        "Description=DBUS1: %s\n\n"
+                        "Description=DBUS1: %s\n"
+                        "Documentation=man:systemd-dbus1-generator(8)\n\n"
                         "[Service]\n"
                         "ExecStart=%s\n"
                         "Type=dbus\n"
@@ -122,7 +123,8 @@ static int create_dbus_files(
                 "# Automatically generated by systemd-dbus1-generator\n\n"
                 "[Unit]\n"
                 "SourcePath=%s\n"
-                "Description=DBUS1: %s\n\n"
+                "Description=DBUS1: %s\n"
+                "Documentation=man:systemd-dbus1-generator(8)\n\n"
                 "[BusName]\n"
                 "Name=%s\n"
                 "Service=%s\n",
index 270dc22..cf9ff73 100644 (file)
@@ -100,7 +100,8 @@ int main(int argc, char *argv[]) {
         fprintf(f,
                 "# Automatially generated by systemd-efi-boot-generator\n\n"
                 "[Unit]\n"
-                "Description=EFI System Partition\n");
+                "Description=EFI System Partition\n"
+                "Documentation=man:systemd-efi-boot-generator(8)\n");
 
         r = generator_write_fsck_deps(f, arg_dest, what, "/boot", "vfat");
         if (r < 0)
index c50586b..248a4ce 100644 (file)
@@ -101,7 +101,8 @@ static int add_swap(const char *what, struct mntent *me) {
         fprintf(f,
                 "# Automatically generated by systemd-fstab-generator\n\n"
                 "[Unit]\n"
-                "SourcePath=/etc/fstab\n\n"
+                "SourcePath=/etc/fstab\n"
+                "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n\n"
                 "[Swap]\n"
                 "What=%s\n",
                 what);
@@ -208,10 +209,11 @@ static int add_mount(
         }
 
         fprintf(f,
-              "# Automatically generated by systemd-fstab-generator\n\n"
-              "[Unit]\n"
-              "SourcePath=%s\n",
-              source);
+                "# Automatically generated by systemd-fstab-generator\n\n"
+                "[Unit]\n"
+                "SourcePath=%s\n"
+                "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
+                source);
 
         if (post && !noauto && !nofail && !automount)
                 fprintf(f,
@@ -278,7 +280,8 @@ static int add_mount(
                 fprintf(f,
                         "# Automatically generated by systemd-fstab-generator\n\n"
                         "[Unit]\n"
-                        "SourcePath=%s\n",
+                        "SourcePath=%s\n"
+                        "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
                         source);
 
                 if (post)
index c4109f3..eb900b1 100644 (file)
@@ -145,7 +145,8 @@ static int add_swap(const char *path, const char *fstype) {
         fprintf(f,
                 "# Automatically generated by systemd-gpt-auto-generator\n\n"
                 "[Unit]\n"
-                "Description=Swap Partition\n\n"
+                "Description=Swap Partition\n"
+                "Documentation=man:systemd-gpt-auto-generator(8)\n\n"
                 "[Swap]\n"
                 "What=%s\n",
                 path);
@@ -205,7 +206,7 @@ static int add_cryptsetup(const char *id, const char *what, char **device) {
                 "# Automatically generated by systemd-gpt-auto-generator\n\n"
                 "[Unit]\n"
                 "Description=Cryptography Setup for %%I\n"
-                "Documentation=man:systemd-cryptsetup@.service(8)\n"
+                "Documentation=man:systemd-gpt-auto-generator(8) man:systemd-cryptsetup@.service(8)\n"
                 "DefaultDependencies=no\n"
                 "Conflicts=umount.target\n"
                 "BindsTo=dev-mapper-%%i.device %s\n"
@@ -331,7 +332,8 @@ static int add_mount(const char *id, const char *what, const char *where, const
         fprintf(f,
                 "# Automatically generated by systemd-gpt-auto-generator\n\n"
                 "[Unit]\n"
-                "Description=%s\n",
+                "Description=%s\n"
+                "Documentation=man:systemd-gpt-auto-generator(8)\n",
                 description);
 
         r = generator_write_fsck_deps(f, arg_dest, what, where, fstype);