nix/os/devices/disk: use sudo for unmounting
This commit is contained in:
parent
9b0fa9016c
commit
de6a675cfb
1 changed files with 4 additions and 4 deletions
|
@ -29,10 +29,10 @@ in rec {
|
||||||
diskUmount = pkgs.writeScript "script" ''
|
diskUmount = pkgs.writeScript "script" ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -xe
|
set -xe
|
||||||
umount -R ${mntRootVol}
|
sudo umount -R ${mntRootVol}
|
||||||
rmdir ${mntRootVol}
|
sudo rmdir ${mntRootVol}
|
||||||
vgchange -an ${ownLib.disk.volumeGroup diskId}
|
sudo vgchange -an ${ownLib.disk.volumeGroup diskId}
|
||||||
cryptsetup luksClose ${ownLib.disk.luksName diskId}
|
sudo cryptsetup luksClose ${ownLib.disk.luksName diskId}
|
||||||
sync
|
sync
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue