projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only set PARTITION=1 if target is a block device.
[grml-debootstrap.git]
/
grml-debootstrap
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
7434527
..
0409092
100755
(executable)
--- a/
grml-debootstrap
+++ b/
grml-debootstrap
@@
-104,10
+104,10
@@
fi
# cmdline handling {{{
# source external command line parameter-processing script
# cmdline handling {{{
# source external command line parameter-processing script
-if [ -r /usr/share/grml-debootstrap/functions/cmdlineopts.clp ] ; then
- . /usr/share/grml-debootstrap/functions/cmdlineopts.clp
-elif [ -r ./cmdlineopts.clp ] ; then
+if [ -r ./cmdlineopts.clp ] ; then
. ./cmdlineopts.clp
. ./cmdlineopts.clp
+elif [ -r /usr/share/grml-debootstrap/functions/cmdlineopts.clp ] ; then
+ . /usr/share/grml-debootstrap/functions/cmdlineopts.clp
else
echo "Error: cmdline function file not found, exiting.">&2
exit 1
else
echo "Error: cmdline function file not found, exiting.">&2
exit 1
@@
-566,11
+566,7
@@
fi
PARTITION=''
DIRECTORY=''
PARTITION=''
DIRECTORY=''
-case $TARGET in
- /dev/*)
- PARTITION=1
- ;;
- *)
+set_target_directory(){
# assume we are installing into a directory, don't run mkfs and grub related stuff therefore
DIRECTORY=1
MNTPOINT="$TARGET"
# assume we are installing into a directory, don't run mkfs and grub related stuff therefore
DIRECTORY=1
MNTPOINT="$TARGET"
@@
-578,8
+574,13
@@
case $TARGET in
TUNE2FS=''
FSCK=''
GRUB=''
TUNE2FS=''
FSCK=''
GRUB=''
- ;;
-esac
+}
+
+if [ -b "$TARGET" ] ; then
+ PARTITION=1
+else
+ set_target_directory
+fi
# }}}
# architecture setup {{{
# }}}
# architecture setup {{{