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
c4447efb
Commit
c4447efb
authored
Sep 30, 2011
by
Nikos Skalkotos
Browse files
Add commondir variable to helper's building system
parent
d46fb573
Changes
12
Hide whitespace changes
Inline
Side-by-side
helper/Makefile.am
View file @
c4447efb
base_name
=
$(
subst
-helper
,,
$(PACKAGE)
)
SUBDIRS
=
tasks
base_name
=
$(
subst
-helper
,,
$(PACKAGE)
)
initdir
=
$(sysconfdir)
commondir
=
$(datarootdir)
/
$(base_name)
export
base_name
export
commondir
dist_doc_DATA
=
COPYING AUTHORS ChangeLog
dist_init_SCRIPTS
=
rc.local snf-passtohash.py
dist_init_DATA
=
common.sh
dist_common_SCRIPTS
=
snf-passtohash.py
dist_common_DATA
=
common.sh
edit
=
sed
\
-e
's|@sysconfdir[@]|
$(sysconfdir)
|g'
\
-e
's|@localstatedir[@]|
$(localstatedir)
|g'
\
-e
's|@datarootdir[@]|
$(datarootdir)
|g'
\
-e
's|@base_name[@]|
$(base_name)
|g'
-e
's|@base_name[@]|
$(base_name)
|g'
\
-e
's|@RESIZE2FS[@]|
$(RESIZE2FS)
|g'
\
-e
's|@XMLSTARLET[@]|
$(XMLSTARLET)
|g'
%
:
%.in Makefile
@
echo
"Real Path is:
$(rootdir)
"
rm
-f
$@
$@
.tmp
srcdir
=
''
;
\
test
-f
./
$@
.in
||
srcdir
=
$(srcdir)
/
;
\
...
...
helper/tasks/10ResizeUnmounted.in
View file @
c4447efb
...
...
@@ -7,7 +7,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
if
[
!
-b
"
$SNF_IMAGE_DEV
"
]
;
then
log_error
"Device file:
\`
${
SNF_IMAGE_DEV
}
' is not a block device"
...
...
helper/tasks/30MountImage.in
View file @
c4447efb
...
...
@@ -7,7 +7,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing"
...
...
helper/tasks/40AddDeleteUnattendScript.in
View file @
c4447efb
...
...
@@ -8,7 +8,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing"
...
...
helper/tasks/40DeleteSSHKeys.in
View file @
c4447efb
...
...
@@ -7,7 +7,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing."
...
...
helper/tasks/40InstallUnattend.in
View file @
c4447efb
...
...
@@ -8,7 +8,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
if
[
-z
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing"
...
...
helper/tasks/40ResizeMounted.in
View file @
c4447efb
...
...
@@ -8,7 +8,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target directory
\`
$SNF_IMAGE_TARGET
' is missing"
...
...
helper/tasks/40SELinuxAutorelabel.in
View file @
c4447efb
...
...
@@ -8,7 +8,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing"
...
...
helper/tasks/50AssignHostname.in
View file @
c4447efb
...
...
@@ -8,7 +8,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
windows_hostname
()
{
local
target
=
$1
...
...
helper/tasks/50ChangePassword.in
View file @
c4447efb
...
...
@@ -8,7 +8,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
windows_password
()
{
local
target
=
$1
...
...
@@ -31,7 +31,7 @@ linux_password() {
local
target
=
$1
local
password
=
$2
local hash
=
$(
/usr/share/snf-image
/snf-passtohash.py
$password
)
local hash
=
$(
@commondir@
/snf-passtohash.py
$password
)
if
[
!
-e
${
target
}
/etc/shadow
]
;
then
log_error
"No /etc/shadow found!"
fi
...
...
helper/tasks/80UmountImage.in
View file @
c4447efb
...
...
@@ -8,7 +8,7 @@
### END TAST INFO
set
-e
.
@
datarootdir@/@base_name
@/common.sh
.
@
commondir
@/common.sh
if
[
!
-d
"
$SNF_IMAGE_TARGET
"
]
;
then
log_error
"Target dir:
\`
$SNF_IMAGE_TARGET
' is missing"
...
...
helper/tasks/Makefile.am
View file @
c4447efb
base_name
=
$(
subst
-helper
,,
$(PACKAGE)
)
tasksdir
=
${libdir}
/
$(base_name)
/tasks
dist_tasks_SCRIPTS
=
\
10ResizeUnmounted
\
30MountImage
\
...
...
@@ -18,7 +17,7 @@ edit = sed \
-e
's|@sysconfdir[@]|
$(sysconfdir)
|g'
\
-e
's|@localstatedir[@]|
$(localstatedir)
|g'
\
-e
's|@datarootdir[@]|
$(datarootdir)
|g'
\
-e
's|@
base_name[@]|
$(base_name
)
|g'
-e
's|@
commondir[@]|
$(commondir
)
|g'
%
:
%.in Makefile
rm
-f
$@
$@
.tmp
...
...
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