untested fix for unable to mount usb disk at boot
This commit is contained in:
parent
9f9558c9e8
commit
6e95932e0e
1 changed files with 8 additions and 2 deletions
|
@ -108,7 +108,7 @@ in rec {
|
|||
};
|
||||
|
||||
programs.busybox = {
|
||||
applets = ["blkid" "lsusb" "tar"];
|
||||
applets = ["blkid" "lsusb" "findfs" "tar"];
|
||||
options = {
|
||||
FEATURE_LS_TIMESTAMPS = "y";
|
||||
FEATURE_LS_SORTFILES = "y";
|
||||
|
@ -121,7 +121,13 @@ in rec {
|
|||
|
||||
services.mount_external_disk = oneshot {
|
||||
name = "mount_external_disk";
|
||||
up = "mount -t ext4 LABEL=backup-disk /srv";
|
||||
up = ''
|
||||
while ! findfs LABEL=backup-disk; do
|
||||
echo waiting for backup-disk
|
||||
sleep 1
|
||||
done
|
||||
mount -t ext4 LABEL=backup-disk /srv
|
||||
'';
|
||||
down = "umount /srv";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue