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
d43dc12e
Kaydet (Commit)
d43dc12e
authored
Nis 04, 2020
tarafından
Your Name
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
eklemeler
üst
58693f9a
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
92 additions
and
15 deletions
+92
-15
98-busybox.sh
src/addons/98-busybox.sh
+13
-2
build-functions.sh
src/build-functions.sh
+9
-5
functions.sh
src/functions.sh
+12
-2
05_rc.dhcp
src/overlay/etc/05_rc.dhcp
+17
-0
fstab
src/overlay/etc/fstab
+0
-0
hosts
src/overlay/etc/hosts
+5
-0
nsswitch.conf
src/overlay/etc/nsswitch.conf
+1
-0
resolv.conf
src/overlay/etc/resolv.conf
+20
-0
00-clear.sh
src/scripts/00-clear.sh
+5
-1
01-dmesg.sh
src/scripts/01-dmesg.sh
+1
-1
03-fsck.sh
src/scripts/03-fsck.sh
+1
-3
96-networking.sh
src/scripts/96-networking.sh
+7
-0
97-fsmount.sh
src/scripts/97-fsmount.sh
+0
-0
99-fsswitch.sh
src/scripts/99-fsswitch.sh
+1
-1
No files found.
src/addons/98-busybox.sh
Dosyayı görüntüle @
d43dc12e
debug
"Install busybox:
$(
which busybox
)
"
install
$(
which busybox
)
$WORKDIR
/busybox
>
/dev/null
bb
=
$(
which busybox
)
if
[
-f
"
$bb
"
]
;
then
if
ldd
$bb
|
grep
"not a dynamic executable"
>
/dev/null
;
then
debug
"Install busybox:
$bb
"
install
$bb
$WORKDIR
/busybox
>
/dev/null
else
err
"Busybox is not a static binary."
exit
1
fi
else
err
"Busybox not found."
exit
1
fi
src/build-functions.sh
Dosyayı görüntüle @
d43dc12e
...
...
@@ -31,19 +31,21 @@ parse_args(){
export
WORKDIR
=
$(
mktemp
)
export
OUTPUT
=
/boot/initrd.img-
$(
uname
-r
)
export
nocolor
=
false
export
keepworkdir
=
false
export
debug
=
false
for
i
in
$*
do
if
[
"
$i
"
==
"-h"
]
||
[
"
$i
"
==
"--help"
]
;
then
help_msg
exit
0
elif
[
"
$i
"
==
"-d"
]
||
[
"
$i
"
==
"--debug"
]
;
then
export
debug
=
true
debug
=
true
elif
[
"
$i
"
==
"-k"
]
||
[
"
$i
"
==
"--keep"
]
;
then
export
keepwordk
ir
=
true
keepworkd
ir
=
true
elif
[
"
$i
"
==
"-n"
]
||
[
"
$i
"
==
"--no-color"
]
;
then
nocolor
=
true
export
nocolor
=
true
elif
[
"
$i
"
==
"-c"
]
||
[
"
$i
"
==
"--no-cpio"
]
;
then
nocpio
=
true
export
nocpio
=
true
elif
[
"
$i
"
==
"-f"
]
||
[
"
$i
"
==
"--fallback"
]
;
then
fallback
=
true
else
...
...
@@ -60,6 +62,8 @@ generate_workdir(){
do
install
$src
/
$file
.sh
$WORKDIR
/
$file
done
msg
"Merging with overlay"
cp
-prf
$src
/overlay/
*
$WORKDIR
}
modules_install
(){
for
i
in
$(
ls
$src
/addons |
sort
)
...
...
@@ -83,7 +87,7 @@ generate_cpio(){
}
clean_directory
(){
if
[
"
$keepworkdir
"
=
=
"true"
]
;
then
if
[
"
$keepworkdir
"
!
=
"true"
]
;
then
rm
-rf
$WORKDIR
msg
"Clearing workdir."
else
...
...
src/functions.sh
Dosyayı görüntüle @
d43dc12e
...
...
@@ -24,7 +24,7 @@ mount_handler(){
/busybox mount
-t
tmpfs tmpfs /tmp
||
true
/busybox mount
-t
tmpfs tmpfs /run
||
true
if
[
-e
/sys/firmware/efi
]
;
then
msg
"UEFI mode detected."
inf
"UEFI mode detected."
mount
-t
efivarfs efivarfs /sys/firmware/efi/efivars
-o
nosuid,nodev,noexec
fi
}
...
...
@@ -75,7 +75,17 @@ detect_root(){
UUID
=
*
)
eval
$root
;
device
=
"/dev/disk/by-uuid/
$UUID
"
;;
LABEL
=
*
)
eval
$root
;
device
=
"/dev/disk/by-label/
$LABEL
"
;;
""
)
err
"No root device specified."
echo
-ne
"
\0
33[33;1mWhere is the root>
\0
33[;0m"
;
read
root
;;
echo
-ne
"
\0
33[33;1m * Where is the root >
\0
33[;0m"
while
read
root
do
if
[
-b
$root
]
;
then
inf
"Setting root
$root
"
return
0
else
warn
"
\"
$root
\"
is not a block device."
echo
-ne
"
\0
33[33;1m * Where is the root>
\0
33[;0m"
fi
done
;;
esac
export
root
export
rootfstype
...
...
src/overlay/etc/05_rc.dhcp
0 → 100644
Dosyayı görüntüle @
d43dc12e
#!/bin/sh
# This script gets called by udhcpc to setup the network interfaces
ip addr add
$ip
/
$mask
dev
$interface
if
[
"
$router
"
]
;
then
ip route add default via
$router
dev
$interface
fi
if
[
"
$ip
"
]
;
then
echo
-e
"DHCP configuration for device
$interface
"
echo
-e
"IP:
\\
e[1m
$ip
\\
e[0m"
echo
-e
"mask:
\\
e[1m
$mask
\\
e[0m"
echo
-e
"router:
\\
e[1m
$router
\\
e[0m"
fi
src/overlay/etc/fstab
0 → 100644
Dosyayı görüntüle @
d43dc12e
src/overlay/etc/hosts
0 → 100644
Dosyayı görüntüle @
d43dc12e
# /etc/hosts
127.0.0.1 localhost
# ipv6
::1 localhost ipv6-localhost
src/overlay/etc/nsswitch.conf
0 → 100644
Dosyayı görüntüle @
d43dc12e
hosts
:
files
dns
src/overlay/etc/resolv.conf
0 → 100644
Dosyayı görüntüle @
d43dc12e
# The number of active DNS resolvers is limited to 3.
#
# https://linux.die.net/man/5/resolv.conf
#
# The MLL strategy is to use one DNS resolver from each provider. The
# first declared DNS resolver is the default one.
# CloudFlare DNS
# http://blog.cloudflare.com/announcing-1111
nameserver
1
.
1
.
1
.
1
#nameserver 1.0.0.1
# Quad9 DNS
# http://quad9.net
nameserver
9
.
9
.
9
.
9
# Google Public DNS
# http://developers.google.com/speed/public-dns
nameserver
8
.
8
.
8
.
8
#nameserver 8.8.4.4
src/scripts/00-clear.sh
Dosyayı görüntüle @
d43dc12e
#!/busybox sh
[
-n
$debug
]
&&
clear
msg
"Starting GNU/Linux"
[
!
-n
$quiet
]
&&
exec
>
/dev/null
if
[
!
-n
$quiet
]
;
then
exec
>
/dev/null
exec
2>/dev/null
fi
src/scripts/01-dmesg.sh
Dosyayı görüntüle @
d43dc12e
msg
"Starting dmesg"
inf
"Starting dmesg"
/busybox dmesg
-n
1
||
true
src/scripts/03-fsck.sh
Dosyayı görüntüle @
d43dc12e
#!/busybox sh
msg
"Running fsck"
mkdir
/etc/
touch
/etc/fstab
inf
"Running fsck"
fsck
-Ta
-y
-t
$rootfstype
"
$root
"
2>/dev/null
src/scripts/96-networking.sh
0 → 100644
Dosyayı görüntüle @
d43dc12e
#Thanks for mll: https://github.com/ivandavidov/minimal
msg
"Trying to connect network."
for
DEVICE
in
/sys/class/net/
*
;
do
inf
"Found network device
${
DEVICE
##*/
}
"
ip
link set
${
DEVICE
##*/
}
up
[
${
DEVICE
##*/
}
!=
lo
]
&&
udhcpc
-b
-i
${
DEVICE
##*/
}
-s
/etc/05_rc.dhcp
done
src/scripts/9
8
-fsmount.sh
→
src/scripts/9
7
-fsmount.sh
Dosyayı görüntüle @
d43dc12e
File moved
src/scripts/99-fsswitch.sh
Dosyayı görüntüle @
d43dc12e
...
...
@@ -11,7 +11,7 @@ debug "Subdir=$subdir"
debug
"init=
$init
"
if
[
-f
/new_root/
$subdir
/etc/initrd.local
]
;
then
msg
"Running local initrd scripts"
inf
"Running local initrd scripts"
.
/new_root/
$subdir
/etc/initrd.local
||
true
fi
...
...
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