Skip to content

Commit

Permalink
Remove unnecessary -n option
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerim Gueney authored and Thomas Lange committed Apr 17, 2015
1 parent 0613443 commit 682edf4
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions bin/fai-cd
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ burn=0
bootonly=0
squash_only=0
keep=0
makeiso=1
nomirror=0
liveos="squashfs-root/LiveOS/"
hidedirs="/usr/share/locale /usr/share/doc /var/lib/apt /var/cache/apt /usr/share/man /var/lib/dpkg/info /media/mirror/aptcache "
Expand Down Expand Up @@ -239,8 +238,6 @@ sleep_now() {
# - - - - - - - - - - - - - - - - - - - - - - - - - -
mkiso() {

[ $makeiso -eq 0 ] && return

echo "Writing FAI CD-ROM image to $isoname. This may need some time."
xorriso -report_about HINT -as mkisofs -graft-points -b $boot_image \
-V "$vname" -A "$aname" \
Expand Down Expand Up @@ -313,7 +310,6 @@ while getopts "nkfhHg:JbSBMm:C:d:" opt ; do
k) keep=1 ;;
M) nomirror=1 ;;
m) mirrordir="$OPTARG" ;;
n) makeiso=0 ;;
b) burn=1 ;;
S) squash_only=1 ;;
B) bootonly=1 ;;
Expand All @@ -325,7 +321,7 @@ shift $(($OPTIND - 1))
isoname=$1

[ $nomirror -eq 1 -a -n "$mirrordir" ] && die 6 "Do not use -M and -m at the same time."
[ $makeiso -eq 1 -a "$#" -eq 0 ] && die 2 "Please specify the output file for the ISO image."
[ "$#" -eq 0 ] && die 2 "Please specify the output file for the ISO image."
if [ $bootonly -eq 0 -a $nomirror -eq 0 ]; then
[ -z "$mirrordir" ] && die 4 "Please specify the directory of your mirror using -m"
[ -d "$mirrordir" ] || die 5 "$mirrordir is not a directory"
Expand All @@ -338,9 +334,7 @@ if [ $bootonly -eq 0 ]; then
[ $(id -u) != "0" ] && die 9 "Run this program as root."
fi

if [ $makeiso -eq 1 ]; then
[ -x "$(which xorriso)" ] || die 8 "xorriso not found. Please install package."
fi
[ -x "$(which xorriso)" ] || die 8 "xorriso not found. Please install package."

[ -x "$(which strings)" ] || die 8 "command strings not found. Please install package binutils."

Expand Down

0 comments on commit 682edf4

Please sign in to comment.