diff options
author | Juergen Borleis <jbe@pengutronix.de> | 2016-05-24 12:54:32 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-05-26 10:29:21 +0200 |
commit | 875ab2e43c7c3355e70deb0ec56ae3cfb015fba5 (patch) | |
tree | 72840f9d39a5357d6e36e4a8784985383a582565 /projectroot/lib/systemd/system/mysqldinit.service | |
parent | 5428e98276eba3cc17ede77ce4c14451295a2d14 (diff) | |
download | ptxdist-875ab2e43c7c3355e70deb0ec56ae3cfb015fba5.tar.gz ptxdist-875ab2e43c7c3355e70deb0ec56ae3cfb015fba5.tar.xz |
mySQL: exhume a gone package by updating it to a new release
After the remove of the old package from the staging area this change adds a
new release of the mySQL package.
Its intended and checked on a read-only root filesystem with write access
in "/var/mysql" only. The database engine runs as a regular user and does
not need root permissions.
Due to its dependency to boost_1_59_0 it uses exactly this version and the
already present boost lib in PTXdist isn't used.
Be aware: its buildsystem uses a huge amount of memory. If your host is low
on memory don't forget to build this package with the '-ji1' parameter.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'projectroot/lib/systemd/system/mysqldinit.service')
-rw-r--r-- | projectroot/lib/systemd/system/mysqldinit.service | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/projectroot/lib/systemd/system/mysqldinit.service b/projectroot/lib/systemd/system/mysqldinit.service new file mode 100644 index 000000000..d7aefcc03 --- /dev/null +++ b/projectroot/lib/systemd/system/mysqldinit.service @@ -0,0 +1,36 @@ +# Copyright (c) 2016, Pengutronix +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# mySQL run-time preparation +# +# Preparation must be run once if the "data" (=working directory) does not +# exist yet. +# Since we expect a read-only root filesystem, we need one writeable filesystem +# part at "/var/mysql". +# +# Sinse we change some permissions, the script itself must run as user 'root' +# + +[Unit] +Description=MySQL Server Initialisation Service +RequiresMountsFor=/var/lib/mysql +ConditionPathExists=!/var/lib/mysql/data + +[Service] +User=root +Group=root +Type=oneshot +RemainAfterExit=yes + +ExecStart=/sbin/mysqlinit "/var/lib/mysql" + +[Install] +WantedBy=multi-user.target |