projects
/
grml-autoconfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ed861cb
)
Improve error handling in config_debootstrap()
author
Michael Prokop
<mika@grml.org>
Mon, 16 Apr 2007 18:01:08 +0000
(20:01 +0200)
committer
Michael Prokop
<mika@grml.org>
Mon, 16 Apr 2007 18:01:08 +0000
(20:01 +0200)
autoconfig.functions
patch
|
blob
|
history
diff --git
a/autoconfig.functions
b/autoconfig.functions
index
7960772
..
11dd166
100755
(executable)
--- a/
autoconfig.functions
+++ b/
autoconfig.functions
@@
-2150,6
+2150,8
@@
config_debootstrap(){
if stringinstring "BOOT_IMAGE=debian2hd " "$CMDLINE" ; then
if stringinstring "BOOT_IMAGE=debian2hd " "$CMDLINE" ; then
+einfo "Bootoption debian2hd found. Setting up environment for automatic installation via grml-debootstrap." ; eend 0
+
if ! [ -x /usr/sbin/grml-debootstrap ] ; then
eerror "Bootoption debian2hd found, but grml-debootstrap is not available." ; eend 1
eerror "Dropping you to a shell, just exit it to continue booting." ; eend 1
if ! [ -x /usr/sbin/grml-debootstrap ] ; then
eerror "Bootoption debian2hd found, but grml-debootstrap is not available." ; eend 1
eerror "Dropping you to a shell, just exit it to continue booting." ; eend 1
@@
-2162,8
+2164,11
@@
if checkbootparam "partition" ; then
# notice: the following checks whether the given partition is available, if not the skip
# execution of grml-debootstrap as it might result in data loss...
if ! [ -r $PARTITION ] ; then
# notice: the following checks whether the given partition is available, if not the skip
# execution of grml-debootstrap as it might result in data loss...
if ! [ -r $PARTITION ] ; then
- e
warn
"Partition $PARTITION does not exist. Skipping execution of grml-debootstrap therefore." ; eend 1
+ e
error
"Partition $PARTITION does not exist. Skipping execution of grml-debootstrap therefore." ; eend 1
fi
fi
+else
+ eerror "No bootoption partition found, can not continue execution of grml-debootstrap." ; eend 1
+ exit 0
fi
if checkbootparam "grub" ; then
fi
if checkbootparam "grub" ; then
@@
-2211,9
+2216,10
@@
AUTOINSTALL='yes' grml-debootstrap $PARTITIONCMD $GRUBCMD $GROOTCMD $RELEASECMD
EOF
chmod 750 /usr/bin/grml-debootstrap_noninteractive
EOF
chmod 750 /usr/bin/grml-debootstrap_noninteractive
-einfo "Bootoption debian2hd found. Running automatic installation via grml-debootstrap." && eend 0
-screen /usr/bin/grml-debootstrap_noninteractive ; einfo "Invoking a shell, just exit to continue booting..." ; /bin/zsh
+screen /usr/bin/grml-debootstrap_noninteractive
+einfo "Invoking a shell, just exit to continue booting..."
+/bin/zsh
fi # stringinstring "BOOT_IMAGE=debian2hd
}
fi # stringinstring "BOOT_IMAGE=debian2hd
}