Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Nicolas Mailloux
kernel
Commits
fc59714e
Commit
fc59714e
authored
2 years ago
by
Nicolas Mailloux
Browse files
Options
Downloads
Patches
Plain Diff
Add Z Shell (zsh) to LOGIN_SHELL flag
parent
28e143e0
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+6
-3
6 additions, 3 deletions
.gitignore
initrd/busybox-1.32.1/_install-emu/etc/init.d/initrd-fifo
+0
-112
0 additions, 112 deletions
initrd/busybox-1.32.1/_install-emu/etc/init.d/initrd-fifo
initrd/common/rcS-root
+4
-1
4 additions, 1 deletion
initrd/common/rcS-root
with
10 additions
and
116 deletions
.gitignore
+
6
−
3
View file @
fc59714e
initrd/busybox-1.32.1/_install-*/etc/init.d/
initrd/busybox-1.32.1/_install-*/opt/build_id
initrd/busybox-1.32.1/_install-*/opt/commit
initrd/busybox-1.32.1/_install-*/opt/bin/uidgen
initrd/busybox-1.32.1/_install-*/bin/checksum-verify
initrd/busybox-1.32.1/_install-*/sbin/setup-wifi
kernel/out
kernel/linux-2.6.35.3/arch/arm/boot/uImage
kernel/linux-2.6.35.3/.config
kernel/linux-2.6.35.3/arch/arm/boot/compressed/lib1funcs.S
kernel/linux-2.6.35.3*/arch/arm/boot/uImage
kernel/linux-2.6.35.3*/.config
kernel/linux-2.6.35.3*/arch/arm/boot/compressed/lib1funcs.S
bootloader/*/u-boot.*
This diff is collapsed.
Click to expand it.
initrd/busybox-1.32.1/_install-emu/etc/init.d/initrd-fifo
deleted
100755 → 0
+
0
−
112
View file @
28e143e0
#!/bin/sh
DEVICE
=
$(
cat
/opt/device
)
if
[
"
${
DEVICE
}
"
!=
"n873"
]
;
then
ROOTFS_FMT
=
"ext4"
else
ROOTFS_FMT
=
"vfat"
fi
omega
()
{
# Memento, homo, quia pulvis es, et in pulverem reverteris.
# Final system rundown
mount
-o
remount,ro /overlaymount-rootfs/mnt/rootfs/overlay &>/dev/null
umount /overlaymount-rootfs/mnt/rootfs/overlay
-l
-f
&>/dev/null
umount /overlaymount-rootfs/mnt/rootfs/read
-l
-f
&>/dev/null
umount /overlaymount-rootfs/mnt/rootfs
-l
-f
&>/dev/null
umount /overlaymount-rootfs/mnt/rootfs-part
-l
-f
&>/dev/null
umount /overlaymount-rootfs/mnt
-l
-f
&>/dev/null
umount /overlaymount-rootfs/proc
-l
-f
&>/dev/null
umount /overlaymount-rootfs/dev
-l
-f
&>/dev/null
umount /overlaymount-rootfs/sys
-l
-f
&>/dev/null
umount /overlaymount-rootfs
-l
-f
&>/dev/null
umount /rootfs-part
-l
-f
&>/dev/null
}
update_rootfs
()
{
mv
/overlaymount-rootfs/mnt/rootfs/overlay/tmp/update/rootfs/rootfs.squashfs /tmp
mv
/overlaymount-rootfs/mnt/rootfs/overlay/tmp/update/rootfs/rootfs.squashfs.dgst /tmp
sync
omega
mkdir
-p
/rootfs-part
mount
-t
"
${
ROOTFS_FMT
}
"
-o
nosuid,noexec,nodev /dev/mmcblk0p3 /rootfs-part
sync
mv
/tmp/rootfs.squashfs /rootfs-part/rootfs.squashfs
mv
/tmp/rootfs.squashfs.dgst /rootfs-part/rootfs.squashfs.dgst
sync
umount
-l
-f
/rootfs-part
}
reset_kobox
()
{
sync
mkdir
-p
/userstore-part
mount
-t
ext4
-o
nosuid,noexec,nodev /dev/mmcblk0p4 /userstore-part
sync
rm
-rf
/userstore-part/X11/rootfs/write
rm
-rf
/userstore-part/X11/rootfs/work
mkdir
-p
/userstore-part/X11/rootfs/write
mkdir
-p
/userstore-part/X11/rootfs/work
sync
umount
-l
-f
/userstore-part
}
if
[[
!
-p
/mnt/run/initrd-fifo
]]
;
then
rm
/mnt/run/initrd-fifo 2>/dev/null
mkfifo
/mnt/run/initrd-fifo 2>/dev/null
fi
while
true
;
do
if
[
-e
/mnt/run/initrd-fifo
]
;
then
if
read
line < /mnt/run/initrd-fifo
;
then
if
[[
"
$line
"
==
"poweroff"
]]
;
then
omega
killall
-q
openrc
busybox poweroff
exit
0
elif
[[
"
$line
"
==
"reboot"
]]
;
then
omega
killall
-q
openrc
busybox reboot
exit
0
elif
[[
"
$line
"
==
"reboot_reset_kobox"
]]
;
then
omega
reset_kobox
killall
-q
openrc
busybox reboot
exit
0
elif
[[
"
$line
"
==
"update_rootfs"
]]
;
then
update_rootfs
killall
-q
openrc
busybox reboot
exit
0
elif
[[
"
$line
"
==
"get_kernel_build_id"
]]
;
then
KERNEL_BUILD_ID
=
$(
cat
/opt/build_id
)
echo
"
${
KERNEL_BUILD_ID
}
"
>
/mnt/run/build_id
elif
[[
"
$line
"
==
"developer_fake-openssl_mount"
]]
;
then
if
grep
-q
"true"
/mnt/opt/developer/key/valid-key &>/dev/null
;
then
if
[
!
-e
/tmp/fake-openssl
]
;
then
cp
/opt/bin/fake-openssl /tmp/fake-openssl
fi
umount
-l
-f
/mnt/usr/bin/openssl &>/dev/null
mount
--bind
/tmp/fake-openssl /mnt/usr/bin/openssl
else
echo
"initrd-fifo: fake-openssl: Permission denied."
fi
elif
[[
"
$line
"
==
"developer_fake-openssl_unmount"
]]
;
then
if
grep
-q
"true"
/mnt/opt/developer/key/valid-key &>/dev/null
;
then
umount
-l
-f
/mnt/usr/bin/openssl
else
echo
"initrd-fifo: fake-openssl: Permission denied."
fi
elif
[[
"
$line
"
==
"alert_splash"
]]
;
then
SPLASH_ERROR_CODE
=
$(
cat
/mnt/run/alert_splash_error_code 2>/dev/null
)
if
[
!
-z
"
${
SPLASH_ERROR_CODE
}
"
]
;
then
/etc/init.d/inkbox-splash alert_splash
"
${
SPLASH_ERROR_CODE
}
"
else
/etc/init.d/inkbox-splash alert_splash 255
fi
fi
fi
else
:
fi
done
&
This diff is collapsed.
Click to expand it.
initrd/common/rcS-root
+
4
−
1
View file @
fc59714e
...
...
@@ -246,11 +246,14 @@ main() {
if
[
"
$LOGIN_SHELL
"
==
"bash"
]
;
then
sed
-i
'1s/.*/root:x:0:0:root:\/root:\/bin\/bash/'
/opt/passwd_root
sed
-i
'30s/.*/user:x:1000:1000:Linux User,,,:\/:\/bin\/bash/'
/opt/passwd_root
elif
[
"
$LOGIN_SHELL
"
==
"zsh"
]
;
then
sed
-i
'1s/.*/root:x:0:0:root:\/root:\/usr\/local\/bin\/zsh/'
/opt/passwd_root
sed
-i
'30s/.*/user:x:1000:1000:Linux User,,,:\/:\/usr\/local\/bin\/zsh/'
/opt/passwd_root
elif
[
"
$LOGIN_SHELL
"
==
"fish"
]
;
then
sed
-i
'1s/.*/root:x:0:0:root:\/root:\/usr\/bin\/fish/'
/opt/passwd_root
sed
-i
'30s/.*/user:x:1000:1000:Linux User,,,:\/:\/usr\/bin\/fish/'
/opt/passwd_root
else
if
[
"
$LOGIN_SHELL
"
!=
"ash"
]
;
then
if
[
!
-z
"
$LOGIN_SHELL
"
]
&&
[
"
$LOGIN_SHELL
"
!=
"ash"
]
;
then
echo
"WARNING: '
$LOGIN_SHELL
' is not a valid login shell. Falling back to default."
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment