Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook into SDDM close-down routine to ensure ZFS homedirs are unmount without hardcoded homedirs #102

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev
Hook into SDDM close-down routine to ensure ZFS homedirs are unmount …
…without hardcoded homedirs comments
  • Loading branch information
panicketchup committed May 22, 2020
commit e11f13e385610f728bd84e9ab656e8b63bc9d15a
@@ -9,11 +9,14 @@
# This will need to be fixed later
# ===============================

# Use last to get the last user logged in and grep for that users homedir pipe to text.
ulist=$(last | awk 'NR==1 {print $1}' | grep -f - /etc/passwd | cut -d":" -f6 | tee)

if [ $? -ne '0' ] ; then
# Safety
exit
else
# No errors good. Finally unmount the dataset
umount -R ${ulist}
zfs unmount -f ${ulist}
fi