Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
initrd
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
initrd
Commits
93b3304e
Kaydet (Commit)
93b3304e
authored
Nis 26, 2020
tarafından
Ali Rıza KESKİN
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
live config eklendi
üst
2c1816ee
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
+41
-2
96-fsmount.sh
src/scripts/96-fsmount.sh
+18
-1
98-blackhole.sh
src/scripts/98-blackhole.sh
+23
-0
99-fsswitch.sh
src/scripts/99-fsswitch.sh
+0
-1
No files found.
src/scripts/9
7
-fsmount.sh
→
src/scripts/9
6
-fsmount.sh
Dosyayı görüntüle @
93b3304e
...
...
@@ -25,7 +25,7 @@ overlay_mount(){
mount
-t
overlay
-o
lowerdir
=
/source/,upperdir
=
/root/a,workdir
=
/root/b overlay /rootfs
if
[
"
$overlay
"
==
"zram"
]
;
then
modprobe zram
num_devices
=
1 2>/dev/null
||
true
echo
$
((
$memtotal
))
>
/sys/block/zram0/disksize
echo
$
memtotal
>
/sys/block/zram0/disksize
sh
mkfs.ext2 /dev/zram0
mount
-t
auto /dev/zram0 /root/a
...
...
@@ -35,6 +35,22 @@ overlay_mount(){
mount
-t
tmpfs
-o
size
=
100% none /root/a
fi
}
live_config
(){
if
[
-f
/rootfs/
$subdir
/sbin/openrc-run
]
;
then
if
[
"
${
live
.user
}
"
!=
""
]
;
then
chroot
/rootfs/
$subdir
/ useradd
"
$live_user
"
||
true
fi
if
[
"
${
live
.keyboard
}
"
!=
""
]
;
then
echo
"keymap=
\"
${
live
.keymap
}
\"
"
>
/rootfs/
$subdir
/etc/conf.d/keymaps
fi
if
[
"
${
live
.locale
}
"
!=
""
]
;
then
export
LANG
=
${
live
.locale
}
export
LC_ALL
=
${
live
.locale
}
fi
else
warn
"Live config cannot works without openrc"
fi
}
live_boot
(){
[
"
$sfs
"
==
""
]
&&
sfs
=
"/main.sfs"
if
[
"
$root
"
==
""
]
;
then
...
...
@@ -58,6 +74,7 @@ live_boot(){
mount /output/
${
sfs
}
/source
overlay_mount
[
-d
/output/merge
]
&&
cp
-prfv
/output/merge/
*
/rootfs/
live_config
common_boot
||
fallback_shell
}
freeze_boot
(){
...
...
src/scripts/98-blackhole.sh
0 → 100644
Dosyayı görüntüle @
93b3304e
#!/busybox ash
tmpfile
=
"/rootfs/
$subdir
/etc/initrd.remove"
rmv
(){
while
read
line
do
if
[
-f
"
$line
"
]
||
[
-d
"
$line
"
]
;
then
rm
-rvf
--
"
$line
"
fi
done
}
if
[
-f
"
$tmpfile
"
]
;
then
cat
"
$tmpfile
"
| rmv
rm
-f
"
$tmpfile
"
touch
"
$tmpfile
"
2>/dev/null
||
true
fi
homedir
=
/rootfs/
$subdir
/data/user/
[
-d
$homedir
]
||
homedir
=
/rootfs/
$subdir
/home
if
[
-d
$homedir
]
;
then
for
user
in
$(
ls
$homedir
)
do
rm
-rf
$homedir
/
$user
/.cache
done
fi
src/scripts/99-fsswitch.sh
Dosyayı görüntüle @
93b3304e
...
...
@@ -9,7 +9,6 @@ if [ -f /rootfs/$subdir/etc/os-release ]; then
else
msg
"Wellcome to"
"
${
C_PURPLE
}
GNU/Linux...
${
C_CLEAR
}
"
fi
sleep
2
if
[
-f
/rootfs/
$subdir
/etc/initrd.local
]
;
then
inf
"Running local initrd scripts"
.
/rootfs/
$subdir
/etc/initrd.local
||
true
...
...
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