From 75759a7c26ff8affd4e262305031437edb0c3141 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 29 Nov 2024 12:31:14 +0700 Subject: [PATCH 01/18] update inittab --- etc/inittab | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/inittab b/etc/inittab index b2e73e8..f2e4a35 100644 --- a/etc/inittab +++ b/etc/inittab @@ -8,4 +8,6 @@ tty2::respawn:/usr/bin/getty 38400 tty2 tty3::respawn:/usr/bin/getty 38400 tty3 tty4::respawn:/usr/bin/getty 38400 tty4 -ttyS0::respawn:/usr/bin/getty 115200 ttyS0 \ No newline at end of file +ttyS0::respawn:/usr/bin/getty 115200 ttyS0 + +console::respawn:/sbin/getty -L console 0 vt100 -- 2.54.0 From 16f440dbecbcdd4631fa6b1976f4753dff6cb691 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 29 Nov 2024 12:32:59 +0700 Subject: [PATCH 02/18] added hostname --- etc/hostname | 1 + etc/hosts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 etc/hostname diff --git a/etc/hostname b/etc/hostname new file mode 100644 index 0000000..55b3dc7 --- /dev/null +++ b/etc/hostname @@ -0,0 +1 @@ +orangepi-pc diff --git a/etc/hosts b/etc/hosts index 3f29fac..19f9c43 100644 --- a/etc/hosts +++ b/etc/hosts @@ -1,2 +1,3 @@ 127.0.0.1 localhost -::1 localhost \ No newline at end of file +::1 localhost +127.0.1.1 orangepi-pc.localdomain orangepi-pc -- 2.54.0 From fd377ab71af29574142bd55980b265bc3404c356 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 29 Nov 2024 12:47:09 +0700 Subject: [PATCH 03/18] added fstab --- etc/fstab | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 etc/fstab diff --git a/etc/fstab b/etc/fstab new file mode 100644 index 0000000..1f9f0cc --- /dev/null +++ b/etc/fstab @@ -0,0 +1,8 @@ +# +/dev/root / ext4 rw,relatime 0 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0 +tmpfs /dev/shm tmpfs mode=1777 0 0 +tmpfs /tmp tmpfs mode=1777 0 0 +tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 +tmpfs /sys sysfs defaults 0 0 -- 2.54.0 From 5af1d9a65b15b9f1349990ecf961991d9dcc3a58 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 29 Nov 2024 12:53:21 +0700 Subject: [PATCH 04/18] default.script is executable --- usr/share/udhcpc/default.script | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 usr/share/udhcpc/default.script diff --git a/usr/share/udhcpc/default.script b/usr/share/udhcpc/default.script old mode 100644 new mode 100755 -- 2.54.0 From edda0deedf05e6645de98210088f3ecd32a337aa Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 29 Nov 2024 12:59:48 +0700 Subject: [PATCH 05/18] update inittab --- etc/inittab | 2 -- 1 file changed, 2 deletions(-) diff --git a/etc/inittab b/etc/inittab index f2e4a35..9f5abe8 100644 --- a/etc/inittab +++ b/etc/inittab @@ -9,5 +9,3 @@ tty3::respawn:/usr/bin/getty 38400 tty3 tty4::respawn:/usr/bin/getty 38400 tty4 ttyS0::respawn:/usr/bin/getty 115200 ttyS0 - -console::respawn:/sbin/getty -L console 0 vt100 -- 2.54.0 From 97a017350bd53f8cf6af7c08bb56d0a37fe3b4a7 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 29 Nov 2024 13:06:48 +0700 Subject: [PATCH 06/18] update interfaces --- etc/network/interfaces | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/network/interfaces b/etc/network/interfaces index d8c9c8a..c2f2b5e 100644 --- a/etc/network/interfaces +++ b/etc/network/interfaces @@ -4,8 +4,8 @@ iface lo inet loopback #-------------------------- #--- eth0 connected to the internet dhcp --- -# auto eth0 -# iface eth0 inet dhcp +auto eth0 +iface eth0 inet dhcp #------------------------------------------- #--- eth0 connected to the internet static --- -- 2.54.0 From 81e41e9e74f3b8b37045baf522e5c0b1c9dfcc4a Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 29 Nov 2024 14:27:09 +0700 Subject: [PATCH 07/18] update inittab --- etc/inittab | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/inittab b/etc/inittab index 9f5abe8..63684ae 100644 --- a/etc/inittab +++ b/etc/inittab @@ -1,7 +1,10 @@ +::sysinit:mkdir /dev/shm +::sysinit:mount -a ::sysinit:/etc/init.d/rcS ::ctrlaltdel:/sbin/reboot ::shutdown:/etc/init.d/rcK +::shutdown:umount -a -r tty1::respawn:/usr/bin/getty 38400 tty1 tty2::respawn:/usr/bin/getty 38400 tty2 -- 2.54.0 From 60ebd52e657ed85891bf3e6315addc494b2fec78 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Sat, 30 Nov 2024 16:31:38 +0700 Subject: [PATCH 08/18] updated ftpd.service --- usr/lib/init/services/ftpd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/lib/init/services/ftpd.service b/usr/lib/init/services/ftpd.service index 0ef87d9..cd4df7b 100755 --- a/usr/lib/init/services/ftpd.service +++ b/usr/lib/init/services/ftpd.service @@ -7,7 +7,7 @@ start() { notify "Starting ftpd" - tcpsvd -vE 0.0.0.0 21 ftpd -w -S -A /srv/ftpd &>/dev/null & + tcpsvd -vE 0.0.0.0 21 ftpd -w -S -A /srv/ftp &>/dev/null & check $? "start ftpd" echo $(pgrep tcpsvd) > /var/run/ftpd.pid return $? -- 2.54.0 From 1d44796d9f102b571dc2a13452151daf22896709 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Thu, 5 Dec 2024 00:02:53 +0700 Subject: [PATCH 09/18] update profile --- etc/profile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/profile b/etc/profile index 9845f19..8b8f26f 100644 --- a/etc/profile +++ b/etc/profile @@ -22,4 +22,6 @@ alias ipl='ip link' # show links alias ll='ls -lh' # show list files with information alias la='ls -a' alias l='ls -alh' +alias df='df -h' +alias free='free -h' #----------- -- 2.54.0 From 98e63cdd116e42d6b5225ce616c4ca7d4e11ea64 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Thu, 5 Dec 2024 00:09:15 +0700 Subject: [PATCH 10/18] update fstab --- etc/fstab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/fstab b/etc/fstab index 1f9f0cc..4a16f9f 100644 --- a/etc/fstab +++ b/etc/fstab @@ -1,5 +1,5 @@ # -/dev/root / ext4 rw,relatime 0 1 +#/dev/root / ext4 rw,relatime 0 1 proc /proc proc defaults 0 0 devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0 tmpfs /dev/shm tmpfs mode=1777 0 0 -- 2.54.0 From 788bd4db56a64ed2d36dcf2c3cee9876ed146323 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Thu, 5 Dec 2024 02:54:20 +0700 Subject: [PATCH 11/18] update interfaces --- etc/network/interfaces | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/network/interfaces b/etc/network/interfaces index c2f2b5e..f0a78b7 100644 --- a/etc/network/interfaces +++ b/etc/network/interfaces @@ -4,13 +4,13 @@ iface lo inet loopback #-------------------------- #--- eth0 connected to the internet dhcp --- -auto eth0 -iface eth0 inet dhcp +# auto eth0 +# iface eth0 inet dhcp #------------------------------------------- #--- eth0 connected to the internet static --- -# auto eth0 -# iface eth0 inet static -# address 192.168.200.1 -# netmask 255.255.255.0 +auto eth0 +iface eth0 inet static + address 192.168.200.1 + netmask 255.255.255.0 #--------------------------------------------- -- 2.54.0 From 680c7eeea8c9723e26eafd60db6efded8b49b9c1 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 6 Dec 2024 00:32:34 +0700 Subject: [PATCH 12/18] added thermal script for orangepipc --- usr/bin/sensors | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 usr/bin/sensors diff --git a/usr/bin/sensors b/usr/bin/sensors new file mode 100644 index 0000000..1c64415 --- /dev/null +++ b/usr/bin/sensors @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ ! -d /sys/class/thermal ]; then + echo ERROR: no thermal interfaces + exit 1 +fi + +for interface in $(ls /sys/class/thermal/ | grep thermal_zone); do + echo $interface: $(($(cat /sys/class/thermal/$interface/temp)/1000))C +done + -- 2.54.0 From e5966f1bd3b25d3da686b9d9f350900b5a0b8b8e Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Fri, 6 Dec 2024 00:40:48 +0700 Subject: [PATCH 13/18] added thermal script for orangepipc --- usr/bin/sensors | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 usr/bin/sensors diff --git a/usr/bin/sensors b/usr/bin/sensors old mode 100644 new mode 100755 -- 2.54.0 From 149aad7741748bae39377bb7d6af103149af0c65 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Thu, 12 Dec 2024 17:29:52 +0700 Subject: [PATCH 14/18] added gitea.service --- etc/group | 3 ++- etc/passwd | 3 ++- usr/lib/init/services/gitea.service | 33 +++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 usr/lib/init/services/gitea.service diff --git a/etc/group b/etc/group index a298035..1270985 100644 --- a/etc/group +++ b/etc/group @@ -1,4 +1,5 @@ root:x:0:root dnsmasq:x:963:dnsmasq sshd:x:33:sshd -nobody:x:65534: \ No newline at end of file +nobody:x:65534: +gitea:x:1000: \ No newline at end of file diff --git a/etc/passwd b/etc/passwd index 72f2cb6..db26337 100644 --- a/etc/passwd +++ b/etc/passwd @@ -1,4 +1,5 @@ root:x:0:0:root:/root:/bin/sh dnsmasq:x:963:963:dnsmasq daemon:/:/usr/bin/nologin sshd:x:33:33:SSH daemon:/var/lib/sshd:/bin/sh -nobody:x:65534:65534:Kernel Oerflow User:/:/usr/bin/nologin \ No newline at end of file +nobody:x:65534:65534:Kernel Oerflow User:/:/usr/bin/nologin +gitea:x:1000:1000:Gitea daemon user:/home/gitea:/bin/sh \ No newline at end of file diff --git a/usr/lib/init/services/gitea.service b/usr/lib/init/services/gitea.service new file mode 100644 index 0000000..8a23cdc --- /dev/null +++ b/usr/lib/init/services/gitea.service @@ -0,0 +1,33 @@ +#!/bin/sh + +#--- import colors and init-funcs --- +. /usr/lib/init/colors.sh +. /usr/lib/init/init-funcs.sh +#------------------------------------ + +start() { + otify "Starting gitea" + su gitea -c "/usr/bin/gitea -w /home/gitea" + check $? "start gitea" + echo $(pgrep gitea) > /var/run/gitea.pid + return $? +} + +stop() { + notify "Stopping gitea" + kill $(cat /var/run/gitea.pid) + check $? "stop gitea" + rm /var/run/gitea.pid &> /dev/null + return $? +} + +case "$1" in + start|stop|restart|reload|help) + "$1" + ;; + *) + help + return 1 + ;; +esac +return $? -- 2.54.0 From 3b90141f90d214160d23f9cb38ac9d2cfa9adc0c Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Thu, 12 Dec 2024 17:32:07 +0700 Subject: [PATCH 15/18] added gitea.service --- etc/init.d/gitea | 1 + usr/share/rc/orders | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 120000 etc/init.d/gitea diff --git a/etc/init.d/gitea b/etc/init.d/gitea new file mode 120000 index 0000000..3f2ac1d --- /dev/null +++ b/etc/init.d/gitea @@ -0,0 +1 @@ +../../usr/lib/init/services/gitea.service \ No newline at end of file diff --git a/usr/share/rc/orders b/usr/share/rc/orders index 5be61d9..120295e 100644 --- a/usr/share/rc/orders +++ b/usr/share/rc/orders @@ -14,4 +14,5 @@ 14httpd 15nginx 16openrouterinit -17dropbear \ No newline at end of file +17dropbear +18gitea \ No newline at end of file -- 2.54.0 From 28d377cb365c2e1c241ec7797abb9c2d421f21d3 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Thu, 12 Dec 2024 17:35:35 +0700 Subject: [PATCH 16/18] added gitea.service --- usr/lib/init/services/gitea.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/lib/init/services/gitea.service b/usr/lib/init/services/gitea.service index 8a23cdc..5054659 100644 --- a/usr/lib/init/services/gitea.service +++ b/usr/lib/init/services/gitea.service @@ -7,7 +7,7 @@ start() { otify "Starting gitea" - su gitea -c "/usr/bin/gitea -w /home/gitea" + su gitea -c "/usr/bin/gitea -w /home/gitea" & check $? "start gitea" echo $(pgrep gitea) > /var/run/gitea.pid return $? -- 2.54.0 From e7aa54763f20082f498b736758a0cf79659ca2a7 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Thu, 12 Dec 2024 17:49:27 +0700 Subject: [PATCH 17/18] added gitea.service --- usr/lib/init/services/gitea.service | 6 +++--- usr/lib/init/services/httpd.service | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/lib/init/services/gitea.service b/usr/lib/init/services/gitea.service index 5054659..6eed33f 100644 --- a/usr/lib/init/services/gitea.service +++ b/usr/lib/init/services/gitea.service @@ -6,8 +6,8 @@ #------------------------------------ start() { - otify "Starting gitea" - su gitea -c "/usr/bin/gitea -w /home/gitea" & + notify "Starting gitea" + su gitea -c "/usr/bin/gitea -w /home/gitea" &> /var/log/gitea.log & check $? "start gitea" echo $(pgrep gitea) > /var/run/gitea.pid return $? @@ -15,7 +15,7 @@ start() { stop() { notify "Stopping gitea" - kill $(cat /var/run/gitea.pid) + kill $(cat /var/run/gitea.pid | awk '{print $2}') check $? "stop gitea" rm /var/run/gitea.pid &> /dev/null return $? diff --git a/usr/lib/init/services/httpd.service b/usr/lib/init/services/httpd.service index 49e5386..e66b0d7 100755 --- a/usr/lib/init/services/httpd.service +++ b/usr/lib/init/services/httpd.service @@ -6,7 +6,7 @@ #------------------------------------ start() { - otify "Starting httpd" + notify "Starting httpd" /usr/bin/httpd -h /srv/www check $? "start httpd" echo $(pgrep httpd) > /var/run/httpd.pid -- 2.54.0 From 97ec853f76f9e553ce7a8d9bf9194376a61932a9 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Tue, 17 Dec 2024 17:42:17 +0700 Subject: [PATCH 18/18] initialization scripts for x86_64 simple linux --- etc/hostname | 2 +- etc/hosts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/hostname b/etc/hostname index 55b3dc7..ab23474 100644 --- a/etc/hostname +++ b/etc/hostname @@ -1 +1 @@ -orangepi-pc +simple diff --git a/etc/hosts b/etc/hosts index 19f9c43..1a98f0e 100644 --- a/etc/hosts +++ b/etc/hosts @@ -1,3 +1,3 @@ 127.0.0.1 localhost ::1 localhost -127.0.1.1 orangepi-pc.localdomain orangepi-pc +127.0.1.1 simple.localdomain simple -- 2.54.0