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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Francois Le Corre
slapos.package
Commits
1eb463f1
Commit
1eb463f1
authored
Sep 05, 2012
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added slapupdate to cron and fix little problems
parent
9590b07b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
slapprepare/slapprepare/script/slapos
slapprepare/slapprepare/script/slapos
+2
-0
slapprepare/slapprepare/slapupdate.py
slapprepare/slapprepare/slapupdate.py
+3
-3
No files found.
slapprepare/slapprepare/script/slapos
View file @
1eb463f1
...
@@ -119,6 +119,8 @@ SHELL=/bin/sh
...
@@ -119,6 +119,8 @@ SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
MAILTO=root
0 0 * * * root /usr/local/bin/slapupdate -v >> /opt/slapos/slapupdate.log 2>&1
"""
>
/etc/cron.d/slapos
"""
>
/etc/cron.d/slapos
if
[
-f
${
SLAPOS_CONFIGURATION
}
/SlapContainer-needed
]
;
then
if
[
-f
${
SLAPOS_CONFIGURATION
}
/SlapContainer-needed
]
;
then
...
...
slapprepare/slapprepare/slapupdate.py
View file @
1eb463f1
...
@@ -171,12 +171,12 @@ def repositories_add (url,alias):
...
@@ -171,12 +171,12 @@ def repositories_add (url,alias):
def
update_software
():
def
update_software
():
""" Upgrade softwares """
""" Upgrade softwares """
_call
([
'zypper'
,
'--gpg-auto-import-keys'
,
'up'
,
'-l'
]
_call
([
'zypper'
,
'--gpg-auto-import-keys'
,
'up'
,
'-l
y
'
]
,
stdout
=
None
)
,
stdout
=
None
)
def
update_system
():
def
update_system
():
""" Dist-Upgrade of system """
""" Dist-Upgrade of system """
_call
([
'zypper'
,
'--gpg-auto-import-keys'
,
'dup'
,
'-l'
],
stdout
=
None
)
_call
([
'zypper'
,
'--gpg-auto-import-keys'
,
'dup'
,
'-l
y
'
],
stdout
=
None
)
def
download_info_from_networkcache
(
path
,
slapos_conf
):
def
download_info_from_networkcache
(
path
,
slapos_conf
):
...
@@ -215,6 +215,7 @@ def get_info_from_master(config):
...
@@ -215,6 +215,7 @@ def get_info_from_master(config):
info
,
path
=
tempfile
.
mkstemp
()
info
,
path
=
tempfile
.
mkstemp
()
if
not
download_info_from_networkcache
(
if
not
download_info_from_networkcache
(
path
,
config
.
slapos_configuration
)
==
False
:
path
,
config
.
slapos_configuration
)
==
False
:
print
open
(
path
,
'r'
).
read
()
return
path
return
path
else
:
else
:
raise
ValueError
(
"No result from shacache"
)
raise
ValueError
(
"No result from shacache"
)
...
@@ -273,7 +274,6 @@ def update_machine(config):
...
@@ -273,7 +274,6 @@ def update_machine(config):
else
:
else
:
logger
.
info
(
"We will now upgrade your packages"
)
logger
.
info
(
"We will now upgrade your packages"
)
update_software
()
update_software
()
os
.
system
(
'reboot'
)
else
:
else
:
if
config
.
last_upgrade
<
config
.
upgrade
:
if
config
.
last_upgrade
<
config
.
upgrade
:
# Purge repositories list and add new ones
# Purge repositories list and add new ones
...
...
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