MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/share/hal/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/hal/scripts/hal-system-storage-cleanup-mountpoints
#!/bin/bash

# Copyright (C) 2005, Kay Sievers <kay.sievers@vrfy.org>
# Copyright (C) 2006, David Zeuthen <davidz@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2.

MOUNT_ROOT="/media"

for DIR in $MOUNT_ROOT/*; do

    # /proc/mounts substitute spaces with 040
    DIRMOD=${DIR//[[:space:]]/040}

    # check if we created it
    if [ -e "$DIR/.created-by-hal" ]; then
	BUSY=0
	while read dev dir type options; do
	    if [ "$dir" = "$DIRMOD" ]; then
		BUSY=1
		break
	    fi
	done < /proc/mounts
	if [ "$BUSY" != "1" ]; then
	    rm -f "$DIR/.created-by-hal"
	    rmdir --ignore-fail-on-non-empty "$DIR"
	fi
    fi
done

exit 0

Anon7 - 2021