#!/bin/sh




#Name:
#un_vol_id - negating check for filesystems (DEPRECATED)
#
#
#Synopsis:
#un_vol_id <device> [<fs_type>]
#
#
#Description:
#Checks a device for a filesystem of any but the specified type or for the
#non-existence of a filesystem of any known type.
#Only filesystems of types known by blkid are recognised.
#
#This check program is deprecated. The check program un_blkid should be used
#instead.
#
#
#Operands:
#<device>
#Specifies the device to be checked (for example /dev/sda or
#/dev/disk/by-label/root).
#
#<fs_type>
#Specifies the filesystem type that should be negatively checked for.
#If omitted or empty, the program will check for the non-existence a filesystem
#of any known type.
#
#
#Exit Status:
#0
#The check was true.
#
#>0
#The check was false.
#
#
#Dependencies:
#This script depends on the check program un_blkid from the cryptsetup package.




device="$1"
fs_type="$2"


#print a warning about the deprecated status of this check program
printf "Warning: The check program un_vol_id is deprecated and will be removed. The check program un_blkid should be used instead.\n" >&2

#invoke the check program un_blkid
/lib/cryptsetup/checks/un_blkid "${device}" "${fs_type}"
















#Copyright © 2010, Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>.
#All rights reserved.
#
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program.  If not, see <http://www.gnu.org/licenses/>.
