summaryrefslogtreecommitdiff
path: root/templates/umount.handler
blob: 4fea195a2d0bbc8eb01346d3cf1d064f76bb42c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# Unmount the specified directory ('dir'), forcefully if necessary.

getconf dir

if ! umount $dir; then
	warning "Simple unmount failed for $dir; being forceful"
	if ! umount -f $dir; then
		warning "Forceful unmount failed for $dir; being lazy"
		if ! umount -l $dir; then
			warning "Lazy unmount failed for $dir; you're on your own"
		fi
	fi
fi