Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
scom
Commits
a29041c8
Kaydet (Commit)
a29041c8
authored
Eyl 11, 2008
tarafından
Fatih Aşıcı
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
do not run ldconfig on livecd
üst
8220030e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
mudur.py
mudur/bin/mudur.py
+4
-1
update-environment.py
mudur/bin/update-environment.py
+11
-7
No files found.
mudur/bin/mudur.py
Dosyayı görüntüle @
a29041c8
...
...
@@ -1267,7 +1267,10 @@ elif sys.argv[1] == "boot":
if
mdirdate
(
"/etc/env.d"
)
>
mdate
(
"/etc/profile.env"
):
ui
.
info
(
_
(
"Updating environment variables"
))
run
(
"/sbin/update-environment"
)
if
config
.
get
(
"livecd"
):
run
(
"/sbin/update-environment"
,
"--live"
)
else
:
run
(
"/sbin/update-environment"
)
cleanupTmp
()
...
...
mudur/bin/update-environment.py
Dosyayı görüntüle @
a29041c8
...
...
@@ -111,28 +111,30 @@ def update_file(path, content):
f
.
write
(
content
)
f
.
close
()
def
update_environment
(
prefix
):
def
update_environment
(
prefix
,
live
):
join
=
os
.
path
.
join
env
=
read_env_d
(
join
(
prefix
,
"etc/env.d"
))
update_file
(
join
(
prefix
,
"etc/profile.env"
),
generate_profile_env
(
env
))
update_file
(
join
(
prefix
,
"etc/csh.env"
),
generate_profile_env
(
env
,
'setenv
%
s
%
s
\n
'
))
if
env
.
has_key
(
"LDPATH"
):
update_file
(
join
(
prefix
,
"etc/ld.so.conf"
),
generate_ld_so_conf
(
env
))
subprocess
.
call
([
"/sbin/ldconfig"
,
"-X"
,
"-r"
,
prefix
])
if
not
live
:
if
env
.
has_key
(
"LDPATH"
):
update_file
(
join
(
prefix
,
"etc/ld.so.conf"
),
generate_ld_so_conf
(
env
))
subprocess
.
call
([
"/sbin/ldconfig"
,
"-X"
,
"-r"
,
prefix
])
#
# Command line driver
#
def
usage
():
print
"update-environment [--destdir <prefix>]"
print
"update-environment [--destdir <prefix>]
[--live]
"
def
main
(
argv
):
prefix
=
"/"
live
=
False
try
:
opts
,
args
=
getopt
.
gnu_getopt
(
argv
,
"h"
,
[
"help"
,
"destdir="
])
opts
,
args
=
getopt
.
gnu_getopt
(
argv
,
"h"
,
[
"help"
,
"destdir="
,
"live"
])
except
getopt
.
GetoptError
:
usage
()
...
...
@@ -142,8 +144,10 @@ def main(argv):
sys
.
exit
(
0
)
if
o
in
(
"--destdir"
):
prefix
=
a
if
o
in
(
"--live"
):
live
=
True
update_environment
(
prefix
)
update_environment
(
prefix
,
live
)
if
__name__
==
"__main__"
:
main
(
sys
.
argv
[
1
:])
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