Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-image
Commits
8704ee47
Commit
8704ee47
authored
Sep 29, 2011
by
Nikos Skalkotos
Browse files
Fix error messages in helper's tasks
parent
91af2694
Changes
10
Hide whitespace changes
Inline
Side-by-side
helper/tasks/10ResizeUnmounted
View file @
8704ee47
...
...
@@ -10,7 +10,7 @@ set -e
.
/usr/share/snf-image/common.sh
if
[
!
-b
"
$SNF_IMAGE_DEV
"
]
;
then
log_error
"Device file:
\`
$SNF_IMAGE_DEV
\
'
is not a block device"
log_error
"Device file:
\`
$
{
SNF_IMAGE_DEV
}
' is not a block device"
fi
if
[
-z
"
$SNF_IMAGE_TYPE
"
]
;
then
...
...
helper/tasks/30MountImage
View file @
8704ee47
...
...
@@ -9,12 +9,12 @@
set
-e
.
/usr/share/snf-image/common.sh
if
[
-z
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
\
'
is missing"
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing"
fi
if
[
!
-b
"
$SNF_IMAGE_DEV
"
]
;
then
log_error
"Device file:
\`
$SNF_IMAGE_DEV
\
'
is not a block device"
log_error
"Device file:
\`
$SNF_IMAGE_DEV
' is not a block device"
fi
mount
$SNF_IMAGE_DEV
$SNF_IMAGE_TARGET
...
...
helper/tasks/40AddDeleteUnattendScript
View file @
8704ee47
...
...
@@ -10,8 +10,8 @@
set
-e
.
/usr/share/snf-image/common.sh
if
[
-z
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir is missing"
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir
:
\`
$SNF_IMAGE_TARGET
'
is missing"
fi
if
[
"
$SNF_IMAGE_TYPE
"
!=
"ntfsdump"
]
;
then
...
...
helper/tasks/40DeleteSSHKeys
View file @
8704ee47
...
...
@@ -9,6 +9,9 @@
set
-e
.
/usr/share/snf-image/common.sh
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing."
fi
if
[
"
$SNF_IMAGE_TYPE
"
!=
"extdump"
]
;
then
exit
0
...
...
helper/tasks/40InstallUnattend
View file @
8704ee47
...
...
@@ -11,7 +11,7 @@ set -e
.
/usr/share/snf-image/common.sh
if
[
-z
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir is missing"
log_error
"Target dir
:
\`
$SNF_IMAGE_TARGET
'
is missing"
fi
if
[
"
$SNF_IMAGE_TYPE
"
!=
"ntfsdump"
]
;
then
...
...
helper/tasks/40ResizeMounted
View file @
8704ee47
...
...
@@ -11,7 +11,7 @@ set -e
.
/usr/share/snf-image/common.sh
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target directory
\`
$SNF_IMAGE_TARGET
\
'
is missing"
log_error
"Target directory
\`
$SNF_IMAGE_TARGET
' is missing"
fi
# Write a diskpart script to %SystemDrive%\Windows\SnfScripts. Sysprep will
...
...
helper/tasks/40SELinuxAutorelabel
View file @
8704ee47
...
...
@@ -10,8 +10,8 @@
set
-e
.
/usr/share/snf-image/common.sh
if
[
-z
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir is missing"
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir
:
\`
$SNF_IMAGE_TARGET
'
is missing"
fi
if
[
"
$SNF_IMAGE_TYPE
"
!=
"extdump"
]
;
then
...
...
helper/tasks/50AssignHostname
View file @
8704ee47
...
...
@@ -54,8 +54,8 @@ linux_hostname() {
sed
-ie
"s/^[[:blank:]]*127
\.
0
\.
1
\.
1[[:blank:]].
\+
$/
127.0.1.1
\t
$hostname
/"
$target
/etc/hosts
}
if
[
-z
"
$SNF_IMAGE_TARGET
"
-o
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"
Missing target directory
"
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"
Target dir:
\`
$SNF_IMAGE_TARGET
' is missing
"
fi
if
[
-z
"
$SNF_IMAGE_HOSTNAME
"
]
;
then
...
...
@@ -63,9 +63,9 @@ if [ -z "$SNF_IMAGE_HOSTNAME" ]; then
fi
if
[
"
$SNF_IMAGE_TYPE
"
=
"ntfsdump"
]
;
then
windows_hostname
$SNF_IMAGE_TARGET
$SNF_IMAGE_
PASSWORD
windows_hostname
$SNF_IMAGE_TARGET
$SNF_IMAGE_
HOSTNAME
elif
[
"
$SNF_IMAGE_TYPE
"
=
"extdump"
]
;
then
linux_hostname
$SNF_IMAGE_TARGET
$SNF_IMAGE_
PASSWORD
linux_hostname
$SNF_IMAGE_TARGET
$SNF_IMAGE_
HOSTNAME
fi
echo
"done"
...
...
helper/tasks/50ChangePassword
View file @
8704ee47
...
...
@@ -58,8 +58,8 @@ linux_password() {
done
}
if
[
-z
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir is missing"
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir
:
\`
$SNF_IMAGE_TARGET
'
is missing"
fi
if
[
-z
"
$SNF_IMAGE_PASSWORD
"
]
;
then
...
...
helper/tasks/80UmountImage
View file @
8704ee47
...
...
@@ -10,8 +10,8 @@
set
-e
.
/usr/share/snf-image/common.sh
if
[
-z
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
\
'
is missing"
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing"
fi
umount
$SNF_IMAGE_TARGET
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment