diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2017-06-30 14:42:35 +0200 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2017-06-30 16:43:43 +0200 |
commit | 5dbe65d9c12d35f8e4b9b674b492f98dbe76832a (patch) | |
tree | 8e011b0816c33379bf6adada14d29c031b8f6986 /projectroot/usr | |
parent | ba9ebc41d68796af335f0fcce4888a332936cea8 (diff) | |
download | DistroKit-5dbe65d9c12d35f8e4b9b674b492f98dbe76832a.tar.gz DistroKit-5dbe65d9c12d35f8e4b9b674b492f98dbe76832a.tar.xz |
datapartition: /usr merge
Since 69841205bc7e114c40ccd3303fae2c97d0c42184 in ptxdist, the systemd
/usr merge is active. Adapt local rules as well.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'projectroot/usr')
-rw-r--r-- | projectroot/usr/lib/systemd/system/systemd-autoformat@.service | 15 | ||||
-rw-r--r-- | projectroot/usr/lib/systemd/system/urshd.service | 10 | ||||
-rw-r--r-- | projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules | 5 |
3 files changed, 30 insertions, 0 deletions
diff --git a/projectroot/usr/lib/systemd/system/systemd-autoformat@.service b/projectroot/usr/lib/systemd/system/systemd-autoformat@.service new file mode 100644 index 0000000..7522140 --- /dev/null +++ b/projectroot/usr/lib/systemd/system/systemd-autoformat@.service @@ -0,0 +1,15 @@ +[Unit] +Before=mnt-data.mount systemd-fsck@%i.service +Description=Create ext4 Data Partition +ConditionPathExists=/dev/%i + +[Service] +Environment=DATAPARTITION=3 +Type=oneshot +# resize partition to maximum +ExecStart=/bin/sh -c 'echo ",+" | sfdisk --force -N$DATAPARTITION /dev/mmcblk0' +# force kernel to reload the partition size of partition 3 +ExecStart=/usr/sbin/partx -d -n $DATAPARTITION /dev/mmcblk0 +ExecStart=/usr/sbin/partx -a -n $DATAPARTITION /dev/mmcblk0 +# create filesystem (this service is only started if we have none) +ExecStart=/sbin/mkfs.ext4 /dev/%i diff --git a/projectroot/usr/lib/systemd/system/urshd.service b/projectroot/usr/lib/systemd/system/urshd.service new file mode 100644 index 0000000..65d04ab --- /dev/null +++ b/projectroot/usr/lib/systemd/system/urshd.service @@ -0,0 +1,10 @@ +[Unit] +Description=urshd Server +After=syslog.target +ConditionKernelCommandLine=devel + +[Service] +ExecStart=/usr/bin/urshd -D + +[Install] +WantedBy=multi-user.target diff --git a/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules b/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules new file mode 100644 index 0000000..1c1a396 --- /dev/null +++ b/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules @@ -0,0 +1,5 @@ +ACTION!="add", GOTO="systemd-autoformat-ext4-devices_end" +SUBSYSTEM!="block", GOTO="systemd-autoformat-ext4-devices_end" +ENV{ID_FS_USAGE}!="filesystem", SUBSYSTEMS=="mmc", KERNEL=="mmcblk0p3", ENV{ID_FS_TYPE}!="ext4", ENV{SYSTEMD_WANTS}+="systemd-autoformat@$name.service" + +LABEL="systemd-autoformat-ext4-devices_end" |