Files
buildroot/package/mender/S42mender
Adam Duskett 9320989053 package/mender: remove /var/lib/mender symlinking
The logic behind making /var/lib/mender a symlink to itself is to
detect if a filesystem is read-only. However, this creates a few problems:

  1) The logic confusing.

  2) The official mender documentation suggests four partitions minimum:
     - boot
     - rootfs A
     - rootfs B
     - data

     If a user is to follow the official documentation, which they should,
     then there is no need for any additional logic for a system setup with
     a read-only filesystem, as the data partition is always read-write.

  3) The post-build.sh script in the board/mender/x86_64 directory removes
     the symlink.

  - Remove symlinking /var/lib/mender to itself

  - Remove the difficult to understand logic dealing with the symlinks
    in S42mender, mender-client.service.

  - Remove the logic dealing with the symlink in
    board/mender/x86_64/post-build.sh

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2025-02-04 13:18:41 +01:00

45 lines
662 B
Bash

#!/bin/sh
#
# Starts mender service.
#
DAEMON="mender"
DAEMON_PATH="/usr/bin/mender"
PIDFILE="/var/run/${DAEMON}.pid"
DAEMON_ARGS="daemon"
start() {
printf "Starting mender service: "
umask 077
start-stop-daemon -bmSqp "$PIDFILE" -x ${DAEMON_PATH} -- ${DAEMON_ARGS}
status=$?
[ "${status}" = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping mender service: "
start-stop-daemon -Kqp "$PIDFILE"
status=$?
[ "${status}" = 0 ] && echo "OK" || echo "FAIL"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|reload|restart}"
exit 1
esac
exit $?