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" ''
|
||||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
umount -R ${mntRootVol}
|
||||
rmdir ${mntRootVol}
|
||||
vgchange -an ${ownLib.disk.volumeGroup diskId}
|
||||
cryptsetup luksClose ${ownLib.disk.luksName diskId}
|
||||
sudo umount -R ${mntRootVol}
|
||||
sudo rmdir ${mntRootVol}
|
||||
sudo vgchange -an ${ownLib.disk.volumeGroup diskId}
|
||||
sudo cryptsetup luksClose ${ownLib.disk.luksName diskId}
|
||||
sync
|
||||
'';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue