Re: simple question
Thomas Lange <[email protected]> Tue, 2 Jul 2024 20:27:55 +0200
| Newsgroups | gmane.linux.debian.fai |
|---|---|
| Message-ID | <[email protected]> |
Hi
in FAI 6.2 I've indroduced some helper functions to define a
customized list of disks. This includes
grepv_disks()
grep_disks()
notmatchdisks()
matchdisks()
smallestdisk()
largestdisk()
all_disks_by_size()
all_disks_and_size()
once_only()
checkdisk()
disks_by_id()
Unfortunately I did not yet prepared an easy to use example
like this old one which does not use the new functions
https://fai-project.org/download/misc/99-disklist.sh
Here's a not tested script that may do the job if saved as
class/99-disklist.sh and don't forget chmod a+rx:
#! /bin/bash
set_bootstick
newlist=$(smallestdisk)
if [ -n "$newlist" ]; then
echo New disklist: $newlist
echo disklist=\"$newlist\" >> $LOGDIR/additional.var
fi
--
best regards Thomas