File: findumpartitions

package info (click to toggle)
fvwm-crystal 3.3.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 19,748 kB
  • ctags: 793
  • sloc: sh: 2,815; cs: 880; python: 875; makefile: 212
file content (24 lines) | stat: -rwxr-xr-x 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

# Find the unmounted partitions from /etc/fstab
# This file is part of FVWM-Crystal
#
# Version:	1.0.0
# Licence:	GPL 2
#
# Written by Dominique Michel <dominique_libre@users.sourceforge.net>, 2013
# for Fvwm-Crystal.

cat /etc/fstab|grep user|grep -v \#| awk '{print $2}'|while read line
do  partition=${line}
	exist=0
	while read lines
		do if [ ${partition} = ${lines} ]
			then exist=1
		   fi
	done </tmp/Icon-Drives
	if [ ${exist} = 0 ]
		then echo AddToMenu $1 \"\$[gt.Mount] ${line}\" Exec exec mount ${line}
	fi
done