Skip to content

Commit afbbb9f

Browse files
authored
Merge pull request #10 from lin1328/main
Add Fedora and Kali
2 parents 52d83c6 + a5929a2 commit afbbb9f

14 files changed

+75
-575
lines changed

.github/workflows/build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ jobs:
8080
container_zip "alpine" "edge"
8181
container_zip "centos" "9-Stream"
8282
container_zip "debian" "bookworm"
83-
container_zip "ubuntu" "jammy"
83+
container_zip "fedora" "41"
84+
container_zip "kali" "current"
8485
container_zip "ubuntu" "oracular"
8586
8687
- name: Release

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
- bullseye
1818
- buster
1919
- trixie
20+
- fedora
21+
- 39
22+
- 40
23+
- `41`
24+
- kali
25+
- `current`
2026
- ubuntu
2127
- focal
2228
- `jammy`

bate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fi
1010
MODULEID="asl"
1111
BASE_DIR="/data"
1212
BACKUP_DIR="/data"
13-
OS_LIST=("ubuntu" "debian" "archlinux" "alpine" "centos")
13+
OS_LIST=("ubuntu" "debian" "archlinux" "alpine" "centos" "fedora" "kali")
1414

1515
echoRgb() {
1616
local message="$1"

config.conf

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Mirror
55
RURIMA_LXC_MIRROR=images.linuxcontainers.org
66
RURIMA_LXC_MIRROR_FALLBACK=mirrors.tuna.tsinghua.edu.cn/lxc-images
7+
78
# OS to install
89
# Make sure there is setup/${RURIMA_LXC_OS}.sh
910
RURIMA_LXC_OS=ubuntu

container_ctrl.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
init_setup() {
44
MODDIR=${0%/*}
55
export PATH="$MODDIR/bin:$PATH"
6-
. "$MODDIR"/config.conf
6+
. "$MODDIR/config.conf"
77
}
88

99
ruriumount() {
1010
init_setup
1111
fuser -k "$CONTAINER_DIR" >/dev/null 2>&1
1212
ruri -U "$CONTAINER_DIR" >/dev/null 2>&1
1313
umount -lvf "$CONTAINER_DIR" 2>/dev/null
14-
umount -lf "$CONTAINER_DIR"/sdcard 2>/dev/null
15-
umount -lf "$CONTAINER_DIR"/sys 2>/dev/null
16-
umount -lf "$CONTAINER_DIR"/proc 2>/dev/null
17-
umount -lf "$CONTAINER_DIR"/dev 2>/dev/null
14+
umount -lf "$CONTAINER_DIR/sdcard" 2>/dev/null
15+
umount -lf "$CONTAINER_DIR/sys" 2>/dev/null
16+
umount -lf "$CONTAINER_DIR/proc" 2>/dev/null
17+
umount -lf "$CONTAINER_DIR/dev" 2>/dev/null
1818
echo "- Container stopped"
1919
sleep 2
2020
}
@@ -25,10 +25,10 @@ ruristart() {
2525
# The servicectl command is an open-source project. If you find it inconvenient to use, you can opt for other startup commands It is not mandatory
2626
# e.g. /usr/sbin/sshd
2727
case "$RURIMA_LXC_OS" in
28-
archlinux|centos)
28+
archlinux|centos|fedora)
2929
START_SERVICES="servicectl start sshd"
3030
;;
31-
debian|ubuntu)
31+
debian|kali|ubuntu)
3232
START_SERVICES="service ssh start"
3333
;;
3434
alpine)

customize.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,12 @@ automatic() {
104104
ui_print "- Download failed. Attempting to download the root filesystem using the fallback source ${RURIMA_LXC_MIRROR_FALLBACK}..."
105105
rurima lxc pull -n -m ${RURIMA_LXC_MIRROR_FALLBACK} -o ${RURIMA_LXC_OS} -v ${RURIMA_LXC_OS_VERSION} -s "$CONTAINER_DIR"
106106
fi
107+
107108
ui_print "- Starting the chroot environment to perform automated installation..."
108109
ui_print "- Please ensure the network environment is stable. The process may take some time, so please be patient!"
109110
ui_print ""
110111
sleep 2
111-
getprop ro.product.model >"$CONTAINER_DIR/etc/hostname"
112+
getprop ro.product.model > "$CONTAINER_DIR/etc/hostname"
112113
mkdir -p "$CONTAINER_DIR/tmp" "$CONTAINER_DIR/usr/local/lib/servicectl/enabled"
113114
cp "$MODPATH/setup/setup.sh" "$CONTAINER_DIR/tmp/setup.sh"
114115
cp -r "$MODPATH/setup/servicectl"/* "$CONTAINER_DIR/usr/local/lib/servicectl/"
@@ -117,7 +118,7 @@ automatic() {
117118
ruri "$CONTAINER_DIR" /bin/sh /tmp/setup.sh "$RURIMA_LXC_OS" "$PASSWORD" "$PORT"
118119

119120
inotifyfile
120-
#rm "$CONTAINER_DIR"/tmp/setup.sh
121+
121122
ui_print "- Automated installation completed!"
122123
ui_print "- Note: Please change the default password. Exposing an SSH port with password authentication instead of key-based authentication is always a high-risk behavior!"
123124
}

module.prop

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ id=asl
22
name=Android Subsystem for GNU/Linux
33
version=v1.0.0
44
versionCode=202412
5-
author=Moe-hacker,Lin1328
5+
author=Moe-hacker & Lin1328
66
description=Android Subsystem for GNU/Linux Powered by ruri

setup/alpine.sh

-26
This file was deleted.

setup/archlinux.sh

-161
This file was deleted.

0 commit comments

Comments
 (0)