Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 336723 | Differences between
and this patch

Collapse All | Expand All

(-)branches/baselayout-1_12/sbin/functions.sh (+25 lines)
Lines 784-789 Link Here
784
    echo "${result# *}"
784
    echo "${result# *}"
785
}
785
}
786
786
787
# bool is_clean(dir)
788
#
789
# Returns 0 if given directory has no files or has only dot-prefixed files.
790
#
791
# EXAMPLE: if is_clean /proc; then ...
792
is_clean() {
793
	local f
794
795
	for f in $1/*; do
796
		[[ -e $f || -L $f ]] && return 1
797
	done
798
799
	return 0
800
}
801
802
# bool is_mounted(mount point)
803
#
804
#   Returns 0 if 'mount point' is really a mount point or non-zerio if it's
805
#   not.
806
#
807
#   EXAMPLE: if is_mounted /dev/pts; then ...
808
is_mounted() {
809
	mountpoint -q "$1"
810
}
811
787
##############################################################################
812
##############################################################################
788
#                                                                            #
813
#                                                                            #
789
# This should be the last code in here, please add all functions above!!     #
814
# This should be the last code in here, please add all functions above!!     #

Return to bug 336723