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
954374dc
Kaydet (Commit)
954374dc
authored
Eyl 26, 2017
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
burya da baktim
üst
f62dbb85
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
26 deletions
+25
-26
adduser.py
scomd/bin/adduser.py
+4
-4
scomd.py
scomd/bin/scomd.py
+16
-17
service.py
scomd/bin/service.py
+2
-2
update-environment.py
scomd/bin/update-environment.py
+1
-1
update-fstab.py
scomd/bin/update-fstab.py
+2
-2
No files found.
scomd/bin/adduser.py
Dosyayı görüntüle @
954374dc
...
...
@@ -15,11 +15,11 @@ from optparse import OptionParser
# first group in the groups list is the main group
user
=
{
"uid"
:
-
1
,
"username"
:
"
kaplan
"
,
"realname"
:
"
Pis
i"
,
"home"
:
"/home/
pis
i"
,
"username"
:
"
Fox
"
,
"realname"
:
"
Inar
i"
,
"home"
:
"/home/
inar
i"
,
"shell"
:
"/bin/bash"
,
"password"
:
"
pis
i"
,
"password"
:
"
inar
i"
,
"defaultgroup"
:
"users"
,
"groups"
:
[],
"admingroups"
:
[
"wheel"
],
...
...
scomd/bin/scomd.py
Dosyayı görüntüle @
954374dc
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#
Pardus
boot and initialization system
#
Sulin
boot and initialization system
# Copyright (C) 2017, Suleyman POYRAZ (AquilaNipalensis)
#
# This program is free software; you can redistribute it and/or modify it
...
...
@@ -29,7 +29,7 @@ from scomd_cgroupfs import Cgroupfs
########
__trans
=
gettext
.
translation
(
'scomd'
,
fallback
=
True
)
_
=
__trans
.
u
gettext
_
=
__trans
.
gettext
##############
# Decorators #
...
...
@@ -370,7 +370,7 @@ class Config:
# Fill in the options
self
.
options
[
"live"
]
=
"thin"
in
options
or
\
os
.
path
.
exists
(
"/run/
pisilinux
/livemedia"
)
os
.
path
.
exists
(
"/run/
sulin
/livemedia"
)
for
k
in
[
_k
for
_k
in
list
(
options
.
keys
())
if
_k
not
in
(
"thin"
)]:
self
.
options
[
k
]
=
options
[
k
]
if
options
[
k
]
else
True
...
...
@@ -492,13 +492,13 @@ class Ui:
def
greet
(
self
):
"""Dump release information, sets unicode mode."""
print
(
self
.
UNICODE_MAGIC
)
if
os
.
path
.
exists
(
"/etc/
pisilinux
-release"
):
release
=
load_file
(
"/etc/
pisilinux
-release"
)
.
rstrip
(
"
\n
"
)
print
(
"
\x1b
[1m
%
s
\x1b
[0;36mhttp://www.pisilinux
.org
\x1b
[0m"
\
if
os
.
path
.
exists
(
"/etc/
sulin
-release"
):
release
=
load_file
(
"/etc/
sulin
-release"
)
.
rstrip
(
"
\n
"
)
sys
.
stdout
.
write
(
"
\x1b
[1m
%
s
\x1b
[0;36mhttp://www.sulin
.org
\x1b
[0m"
\
%
release
)
else
:
self
.
error
(
_
(
"Cannot find /etc/
pisilinux
-release"
))
print
(
)
self
.
error
(
_
(
"Cannot find /etc/
sulin
-release"
))
sys
.
stdout
.
write
(
"
\n
"
)
def
info
(
self
,
msg
):
"""Print the given message and log if debug enabled."""
...
...
@@ -601,7 +601,7 @@ def load_translations():
global
_
lang
=
CONFIG
.
get
(
"language"
)
__trans
=
gettext
.
translation
(
'scomd'
,
languages
=
[
lang
],
fallback
=
True
)
_
=
__trans
.
u
gettext
_
=
__trans
.
gettext
def
set_unicode_mode
():
"""Makes TTYs unicode compatible."""
...
...
@@ -751,8 +751,8 @@ def stop_services():
def
prune_needs_action_package_list
():
"""Clears the lists to hold needsServiceRestart and needsReboot updates."""
for
_file
in
(
"/var/lib/
pisi
/info/needsrestart"
,
"/var/lib/
pisi
/info/needsreboot"
):
for
_file
in
(
"/var/lib/
spam
/info/needsrestart"
,
"/var/lib/
spam
/info/needsreboot"
):
if
os
.
path
.
exists
(
_file
):
os
.
unlink
(
_file
)
...
...
@@ -920,7 +920,7 @@ def check_root_filesystem():
UI
.
warn
(
_
(
"Filesystem repaired, but reboot needed!"
))
i
=
0
while
i
<
4
:
print
(
"
\07
"
)
sys
.
stdout
.
write
(
"
\07
"
)
time
.
sleep
(
1
)
i
+=
1
UI
.
warn
(
_
(
"Rebooting in 10 seconds..."
))
...
...
@@ -1308,13 +1308,12 @@ def stop_system():
def
except_hook
(
e_type
,
e_value
,
e_trace
):
"""Hook that intercepts and handles exceptions."""
import
traceback
print
(
)
print
(
_
(
"An internal error occured. Please report to the bugs.pisilinux.org"
sys
.
stdout
.
write
(
"
\n
"
)
sys
.
stdout
.
write
(
_
(
"An internal error occured. Please report to the bugs.pisilinux.org"
"with following information:"
)
.
encode
(
"utf-8"
))
print
()
print
(
e_type
,
e_value
)
sys
.
stdout
.
write
(
e_type
);
sys
.
stdout
.
write
(
e_value
)
traceback
.
print_tb
(
e_trace
)
print
(
)
sys
.
stdout
.
write
(
"
\n
"
)
run_full
(
"/sbin/sulogin"
)
...
...
scomd/bin/service.py
Dosyayı görüntüle @
954374dc
...
...
@@ -23,13 +23,13 @@ import subprocess
import
gettext
__trans
=
gettext
.
translation
(
'scomd'
,
fallback
=
True
)
_
=
__trans
.
u
gettext
_
=
__trans
.
gettext
# Utilities
def
loadConfig
(
path
):
d
=
{}
for
line
in
file
(
path
):
for
line
in
open
(
path
):
if
line
!=
""
and
not
line
.
startswith
(
"#"
)
and
"="
in
line
:
key
,
value
=
line
.
split
(
"="
,
1
)
key
=
key
.
strip
()
...
...
scomd/bin/update-environment.py
Dosyayı görüntüle @
954374dc
...
...
@@ -101,7 +101,7 @@ def generate_profile_env(envdict, format='export %s="%s"\n'):
return
header
+
header_note
+
profile
def
update_file
(
path
,
content
):
f
=
file
(
path
,
"w"
)
f
=
open
(
path
,
"w"
)
f
.
write
(
content
)
f
.
close
()
...
...
scomd/bin/update-fstab.py
Dosyayı görüntüle @
954374dc
...
...
@@ -31,7 +31,7 @@ default_mount_dir = "/mnt"
excluded_file_systems
=
(
"proc"
,
"tmpfs"
,
"sysfs"
,
"linux-swap"
,
"swap"
,
"nfs"
,
"nfs4"
,
"cifs"
)
sulin_labels
=
(
"
PARDUS_ROOT"
,
"PARDUS_HOME"
,
"PARDUS
_SWAP"
)
sulin_labels
=
(
"
SULIN_ROOT"
,
"SULIN_HOME"
,
"SULIN
_SWAP"
)
# Utility functions
...
...
@@ -160,7 +160,7 @@ class Fstab:
if
entry
.
mount_point
!=
"none"
and
not
os
.
path
.
exists
(
entry
.
mount_point
):
os
.
makedirs
(
entry
.
mount_point
)
f
=
file
(
path
,
"w"
)
f
=
open
(
path
,
"w"
)
f
.
write
(
self
.
comment
)
f
.
write
(
str
(
self
))
f
.
write
(
"
\n
"
)
...
...
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