Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
slapos.package
Commits
6894b3c2
Commit
6894b3c2
authored
Jun 30, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resource_stream -> resource_string
parent
4a7af070
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
slapprepare/slapprepare/slapprepare.py
slapprepare/slapprepare/slapprepare.py
+16
-16
No files found.
slapprepare/slapprepare/slapprepare.py
View file @
6894b3c2
...
@@ -237,8 +237,8 @@ def slapserver(config):
...
@@ -237,8 +237,8 @@ def slapserver(config):
print
"Creating %r"
%
host_path
print
"Creating %r"
%
host_path
if
not
dry_run
:
if
not
dry_run
:
open
(
host_path
,
'w'
).
write
(
open
(
host_path
,
'w'
).
write
(
pkg_resources
.
resource_str
eam
(
__name__
,
pkg_resources
.
resource_str
ing
(
__name__
,
'template/hosts.in'
)
.
read
()
%
{
'template/hosts.in'
)
%
{
'computer_id'
:
config
.
computer_id
'computer_id'
:
config
.
computer_id
})
})
...
@@ -247,8 +247,8 @@ def slapserver(config):
...
@@ -247,8 +247,8 @@ def slapserver(config):
print
"Creating %r"
%
sshd_path
print
"Creating %r"
%
sshd_path
if
not
dry_run
:
if
not
dry_run
:
open
(
sshd_path
,
'w'
).
write
(
open
(
sshd_path
,
'w'
).
write
(
pkg_resources
.
resource_str
eam
(
__name__
,
pkg_resources
.
resource_str
ing
(
__name__
,
'template/sshd_config.in'
)
.
read
()
)
'template/sshd_config.in'
))
os
.
chmod
(
sshd_path
,
0o600
)
os
.
chmod
(
sshd_path
,
0o600
)
# Creating default bridge config
# Creating default bridge config
...
@@ -256,8 +256,8 @@ def slapserver(config):
...
@@ -256,8 +256,8 @@ def slapserver(config):
print
"Creating %r"
%
br0_path
print
"Creating %r"
%
br0_path
if
not
dry_run
:
if
not
dry_run
:
open
(
br0_path
,
'w'
).
write
(
open
(
br0_path
,
'w'
).
write
(
pkg_resources
.
resource_str
eam
(
__name__
,
pkg_resources
.
resource_str
ing
(
__name__
,
'template/ifcfg-br0.in'
)
.
read
()
)
'template/ifcfg-br0.in'
))
# Creating default limits config
# Creating default limits config
limits_conf_path
=
os
.
path
.
join
(
mount_dir_path
,
limits_conf_path
=
os
.
path
.
join
(
mount_dir_path
,
...
@@ -265,8 +265,8 @@ def slapserver(config):
...
@@ -265,8 +265,8 @@ def slapserver(config):
print
"Overriding %s"
%
limits_conf_path
print
"Overriding %s"
%
limits_conf_path
if
not
dry_run
:
if
not
dry_run
:
open
(
limits_conf_path
,
'w'
).
write
(
open
(
limits_conf_path
,
'w'
).
write
(
pkg_resources
.
resource_str
eam
(
__name__
,
pkg_resources
.
resource_str
ing
(
__name__
,
'template/limits.conf.in'
)
.
read
()
)
'template/limits.conf.in'
))
# Writing ssh key
# Writing ssh key
if
config
.
need_ssh
:
if
config
.
need_ssh
:
...
@@ -305,8 +305,8 @@ def slapserver(config):
...
@@ -305,8 +305,8 @@ def slapserver(config):
path
=
os
.
path
.
join
(
mount_dir_path
,
'etc'
,
'init.d'
,
script
)
path
=
os
.
path
.
join
(
mount_dir_path
,
'etc'
,
'init.d'
,
script
)
print
"Creating %r"
%
path
print
"Creating %r"
%
path
if
not
dry_run
:
if
not
dry_run
:
open
(
path
,
'w'
).
write
(
pkg_resources
.
resource_str
eam
(
__name__
,
open
(
path
,
'w'
).
write
(
pkg_resources
.
resource_str
ing
(
__name__
,
'script/%s'
%
script
)
.
read
()
)
'script/%s'
%
script
))
os
.
chmod
(
path
,
0o755
)
os
.
chmod
(
path
,
0o755
)
else
:
else
:
for
script
in
[
'slapos_firstboot'
]:
for
script
in
[
'slapos_firstboot'
]:
...
@@ -345,8 +345,8 @@ def prepare_scripts(config):
...
@@ -345,8 +345,8 @@ def prepare_scripts(config):
print
"Creating %r"
%
path
print
"Creating %r"
%
path
if
not
dry_run
:
if
not
dry_run
:
open
(
path
,
'w'
).
write
(
open
(
path
,
'w'
).
write
(
pkg_resources
.
resource_str
eam
(
__name__
,
pkg_resources
.
resource_str
ing
(
__name__
,
'script/slapos'
)
.
read
()
%
{
'script/slapos'
)
%
{
'slapos_configuration'
:
slapos_configuration
'slapos_configuration'
:
slapos_configuration
})
})
os
.
chmod
(
path
,
0o755
)
os
.
chmod
(
path
,
0o755
)
...
@@ -355,8 +355,8 @@ def prepare_scripts(config):
...
@@ -355,8 +355,8 @@ def prepare_scripts(config):
print
"Creating %r"
%
path
print
"Creating %r"
%
path
if
not
dry_run
:
if
not
dry_run
:
open
(
path
,
'w'
).
write
(
open
(
path
,
'w'
).
write
(
pkg_resources
.
resource_str
eam
(
__name__
,
pkg_resources
.
resource_str
ing
(
__name__
,
'script/slapos.service'
)
.
read
()
%
{
'script/slapos.service'
)
%
{
'slapos_configuration'
:
slapos_configuration
'slapos_configuration'
:
slapos_configuration
})
})
os
.
chmod
(
path
,
0o755
)
os
.
chmod
(
path
,
0o755
)
...
@@ -366,8 +366,8 @@ def prepare_scripts(config):
...
@@ -366,8 +366,8 @@ def prepare_scripts(config):
print
"Creating %r"
%
path
print
"Creating %r"
%
path
if
not
dry_run
:
if
not
dry_run
:
open
(
path
,
'w'
).
write
(
open
(
path
,
'w'
).
write
(
pkg_resources
.
resource_str
eam
(
__name__
,
pkg_resources
.
resource_str
ing
(
__name__
,
'template/clientipv4.conf.in'
)
.
read
()
)
'template/clientipv4.conf.in'
))
os
.
chmod
(
path
,
0o755
)
os
.
chmod
(
path
,
0o755
)
# Remove old-timers scripts
# Remove old-timers scripts
...
...
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