File: 00_remove_model_symlink

package info (click to toggle)
usbmount 0.0.21
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 100 kB
  • ctags: 2
  • sloc: sh: 189; makefile: 2
file content (23 lines) | stat: -rwxr-xr-x 710 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# This script removes the model name symlink in /var/run/usbmount.
# Copyright (C) 2005 Martin Dickopp
#
# This file is free software; the copyright holder gives unlimited
# permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
#
set -e

ls /var/run/usbmount | while read name; do
    if test "`readlink \"/var/run/usbmount/$name\" || :`" = "$UM_MOUNTPOINT"; then
	rm -f "/var/run/usbmount/$name"
	break
    fi
done

exit 0