diff options
Diffstat (limited to 'units')
-rw-r--r-- | units/fsck@.service | 13 | ||||
-rw-r--r-- | units/opt-system-csc.mount | 4 | ||||
-rw-r--r-- | units/opt-usr.mount | 4 | ||||
-rw-r--r-- | units/opt.mount | 4 | ||||
-rw-r--r-- | units/resize2fs-root.service | 12 | ||||
-rw-r--r-- | units/resize2fs@.service | 14 |
6 files changed, 48 insertions, 3 deletions
diff --git a/units/fsck@.service b/units/fsck@.service new file mode 100644 index 0000000..f70d1d4 --- /dev/null +++ b/units/fsck@.service @@ -0,0 +1,13 @@ +[Unit] +Description=File System Check on %f +DefaultDependencies=no +BindsTo=%i.device +After=%i.device +Before=shutdown.target + +[Service] +Type=oneshot +ExecStart=/sbin/e2fsck -y -f %f +StandardOutput=journal+console +TimeoutSec=0 +SuccessExitStatus=0 1 diff --git a/units/opt-system-csc.mount b/units/opt-system-csc.mount index 4969845..2b1a500 100644 --- a/units/opt-system-csc.mount +++ b/units/opt-system-csc.mount @@ -1,7 +1,9 @@ [Unit] +Description=Mount to /opt/system/csc DefaultDependencies=no Before=local-fs.target -After=local-fs-pre.target +After=local-fs-pre.target fsck@dev-disk-by\x2dpartlabel-csc.service resize2fs@dev-disk-by\x2dpartlabel-csc.service +Wants=resize2fs@dev-disk-by\x2dpartlabel-csc.service [Mount] What=/dev/disk/by-partlabel/csc diff --git a/units/opt-usr.mount b/units/opt-usr.mount index 53938ca..70912ff 100644 --- a/units/opt-usr.mount +++ b/units/opt-usr.mount @@ -1,8 +1,10 @@ [Unit] +Description=Mount to /opt/usr DefaultDependencies=no ConditionPathExists=!/opt/etc/.odeprogress Before=local-fs.target -After=local-fs-pre.target +After=local-fs-pre.target fsck@dev-disk-by\x2dpartlabel-user.service resize2fs@dev-disk-by\x2dpartlabel-user.service +Wants=resize2fs@dev-disk-by\x2dpartlabel-user.service [Mount] What=/dev/disk/by-partlabel/user diff --git a/units/opt.mount b/units/opt.mount index e1302b7..e4a2201 100644 --- a/units/opt.mount +++ b/units/opt.mount @@ -1,7 +1,9 @@ [Unit] +Description=Mount to /opt DefaultDependencies=no Before=local-fs.target -After=local-fs-pre.target +After=local-fs-pre.target fsck@dev-disk-by\x2dpartlabel-system\x2ddata.service resize2fs@dev-disk-by\x2dpartlabel-system\x2ddata.service +Wants=resize2fs@dev-disk-by\x2dpartlabel-system\x2ddata.service [Mount] What=/dev/disk/by-partlabel/system-data diff --git a/units/resize2fs-root.service b/units/resize2fs-root.service new file mode 100644 index 0000000..8b8a899 --- /dev/null +++ b/units/resize2fs-root.service @@ -0,0 +1,12 @@ +[Unit] +Description=Resize of File System on the Root Device +DefaultDependencies=no +Before=local-fs.target shutdown.target + +[Service] +Type=oneshot +ExecStartPre=/bin/mount -o remount,rw / +ExecStart=/bin/bash -c "/usr/bin/resize2fs_by_partlabel.sh rootfs" +ExecStartPost=/bin/ln -s /dev/null /etc/systemd/system/resize2fs-root.service +StandardOutput=journal+console +TimeoutSec=0 diff --git a/units/resize2fs@.service b/units/resize2fs@.service new file mode 100644 index 0000000..e761df5 --- /dev/null +++ b/units/resize2fs@.service @@ -0,0 +1,14 @@ +[Unit] +Description=Resize of File System on %f +DefaultDependencies=no +BindsTo=%i.device +After=fsck@%i.service +Requires=fsck@%i.service +Before=local-fs.target shutdown.target + +[Service] +Type=oneshot +ExecStart=/sbin/resize2fs -f %f +ExecStartPost=/bin/ln -s /dev/null /etc/systemd/system/resize2fs@%i.service +StandardOutput=journal+console +TimeoutSec=0 |