Skip to content

Commit

Permalink
03.system-tweaks: configure automounting
Browse files Browse the repository at this point in the history
Install udiskie: lightweight automounter daemon for removable media on Linux.
Install and enable udiskie.service file.

Signed-off-by: mlradu <larisa.radu@analog.com>
  • Loading branch information
mlradu committed Jul 30, 2024
1 parent 34b8370 commit 15a33e9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
udiskie
13 changes: 13 additions & 0 deletions stages/03.system-tweaks/05.automount/files/udiskie.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Udiskie service for managing removable media
After=network.target

[Service]
# Start udiskie with the following parameters to make it independent of the desktop environment:
# --no-notify: suppresses desktop notifications
# -f "": prevents udiskie from managing any devices
ExecStart=/usr/bin/udiskie --no-notify -f ""
Restart=on-failure

[Install]
WantedBy=multi-user.target
15 changes: 15 additions & 0 deletions stages/03.system-tweaks/05.automount/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# SPDX-License-Identifier: BSD-3-Clause
#
# kuiper2.0 - Embedded Linux for Analog Devices Products
#
# Copyright (c) 2024 Analog Devices, Inc.
# Author: Larisa Radu <larisa.radu@analog.com>

# Add udiskie service
install -m 644 "${BASH_SOURCE%%/run.sh}"/files/udiskie.service "${BUILD_DIR}/lib/systemd/system/"

chroot "${BUILD_DIR}" << EOF
# Enable udiskie service to run automatically at every boot
systemctl enable udiskie
EOF

0 comments on commit 15a33e9

Please # to comment.