Skip to content

Commit

Permalink
Merge pull request #32 from cjom/main
Browse files Browse the repository at this point in the history
Rename essential system scripts
  • Loading branch information
cjom authored Sep 28, 2024
2 parents 43dd496 + ac1fa82 commit 24dbe10
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body:
REG Linux version used.
GUI: SYSTEM SETTINGS -> INFORMATION
Terminal: cat /usr/share/reglinux/system.version
Or details can be obtained from batocera-info in your support file. (See logs below)
Or details can be obtained from system-info in your support file. (See logs below)
placeholder: 39-dev-2da5edeea0 2024/02/03 03:28
validations:
required: true
Expand Down
14 changes: 7 additions & 7 deletions board/fsoverlay/etc/init.d/S97update
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ function mountshareinternal() {
SHAREMOUNT="/tmp/SHARE_INTERNAL"
mkdir -p "$SHAREMOUNT"
PARTTYPE=$(blkid -o value -s TYPE "$SHAREPART")
echo "cmd: batocera-mount \"${PARTTYPE}\" 1 \"$SHAREPART\" \"$SHAREMOUNT\"" >>"$LOG"
if ! batocera-mount "${PARTTYPE}" 1 "$SHAREPART" "$SHAREMOUNT" >>"$LOG" 2>&1; then
echo "cmd: system-mount \"${PARTTYPE}\" 1 \"$SHAREPART\" \"$SHAREMOUNT\"" >>"$LOG"
if ! system-mount "${PARTTYPE}" 1 "$SHAREPART" "$SHAREMOUNT" >>"$LOG" 2>&1; then
echo "Error mounting SHARE partition!" >>"$LOG"
display_error
fi
Expand Down Expand Up @@ -112,7 +112,7 @@ if grep -qE '^[ ]*newbootuuid[ ]*=[ ]*true[ ]*$' "${BOOTCONF}"; then
fi

# Search for upgrade file to finish upgrading REG-linux
SHAREPART=$(batocera-part share_internal)
SHAREPART=$(system-part share_internal)
SHAREMOUNT=$(grep -m 1 -E "^$SHAREPART " /proc/mounts | awk '{print $2}')
[ -z "$SHAREMOUNT" ] && mountshareinternal

Expand Down Expand Up @@ -146,7 +146,7 @@ if [ "$TASKS" -ge 1000 ]; then

# Fix uuid
((CURRENTSTEP += 400))
BOOTPART=$(/usr/bin/batocera-part boot)
BOOTPART=$(/usr/bin/system-part boot)
NEWUUID=$(blkid -o value -s UUID "$BOOTPART")
if [ -n "$NEWUUID" ]; then
echo "Updating boot files with boot partition UUID" >>"$LOG"
Expand All @@ -162,7 +162,7 @@ fi
# only when random UUID for boot partition is wanted (usually first boot only)
if [ "$TASKS" -ge 100 ]; then

BOOTPART="$(/usr/bin/batocera-part boot)"
BOOTPART="$(/usr/bin/system-part boot)"

echo "Changing UUID of boot partition to a new random UUID" >>"$LOG"
((CURRENTSTEP += 50))
Expand Down Expand Up @@ -216,11 +216,11 @@ fi
if [ "$TASKS" -ge 1 ]; then

# /userdata partition
PARTNUM=$(batocera-part "share_internal_num")
PARTNUM=$(system-part "share_internal_num")
echo "Partition name: $SHAREPART & number: $PARTNUM" >>"$LOG"

# boot disk
DISK=$(batocera-part prefix "${SHAREPART}")
DISK=$(system-part prefix "${SHAREPART}")
echo "Disk = $DISK" >>"$LOG"

# only for ext4
Expand Down
2 changes: 1 addition & 1 deletion board/fsoverlay/etc/profile.d/25-language.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
settings_lang="$(/usr/bin/batocera-settings-get system.language || echo 'en_US')"
settings_lang="$(system-settings-get system.language || echo 'en_US')"
env_lang="${settings_lang}.UTF-8"
if test -n $LANG; then
echo "Set Language environment variable to - ${env_lang}"
Expand Down
18 changes: 9 additions & 9 deletions board/fsoverlay/lib/udev/rules.d/usbmount.rules
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Rules for USBmount -*- conf -*-

KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add"
KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add"
KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add"
KERNEL=="mmcblk*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add"
KERNEL=="nvme*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/batocera-usbmount add"
KERNEL=="sd*", ACTION=="remove", RUN+="/usr/bin/batocera-usbmount remove"
KERNEL=="ub*", ACTION=="remove", RUN+="/usr/bin/batocera-usbmount remove"
KERNEL=="mmcblk*", ACTION=="remove", RUN+="/usr/bin/batocera-usbmount remove"
KERNEL=="nvme*", ACTION=="remove", RUN+="/usr/bin/batocera-usbmount remove"
KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", RUN+="/usr/bin/system-usbmount add"
KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/system-usbmount add"
KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/system-usbmount add"
KERNEL=="mmcblk*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/system-usbmount add"
KERNEL=="nvme*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/bin/system-usbmount add"
KERNEL=="sd*", ACTION=="remove", RUN+="/usr/bin/system-usbmount remove"
KERNEL=="ub*", ACTION=="remove", RUN+="/usr/bin/system-usbmount remove"
KERNEL=="mmcblk*", ACTION=="remove", RUN+="/usr/bin/system-usbmount remove"
KERNEL=="nvme*", ACTION=="remove", RUN+="/usr/bin/system-usbmount remove"
2 changes: 1 addition & 1 deletion board/patches/usbmount/0003-ntfs3g.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ index c09a865..7d89dbf 100755
# Mount the filesystem.
log info "executing command: mount -t$fstype ${options:+-o$options} $DEVNAME $mountpoint"
- mount "-t$fstype" "${options:+-o$options}" "$DEVNAME" "$mountpoint"
+ batocera-mount "$fstype" 0 "${DEVNAME}" "${mountpoint}"
+ system-mount "$fstype" 0 "${DEVNAME}" "${mountpoint}"

# Determine vendor and model.
vendor=
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ index 06102cd..27193f6 100755
# Mount the filesystem.
log info "executing command: mount -t$fstype ${options:+-o$options} $DEVNAME $mountpoint"
+ mkdir -p "${mountpoint}"
batocera-mount "$fstype" 0 "${DEVNAME}" "${mountpoint}"
system-mount "$fstype" 0 "${DEVNAME}" "${mountpoint}"

# Determine vendor and model.
@@ -169,18 +182,16 @@ if [ "$1" = add ]; then
Expand Down
34 changes: 0 additions & 34 deletions board/x86/fsoverlay/etc/init.d/S05nvidia

This file was deleted.

62 changes: 0 additions & 62 deletions board/x86/fsoverlay/etc/init.d/S30checkprime

This file was deleted.

44 changes: 0 additions & 44 deletions board/x86/fsoverlay/etc/init.d/S70fans

This file was deleted.

21 changes: 0 additions & 21 deletions board/x86/fsoverlay/etc/init.d/S92nvdownload

This file was deleted.

2 changes: 1 addition & 1 deletion buildroot
Submodule buildroot updated 36 files
+1 −1 boot/uboot/uboot.mk
+1 −1 linux/Config.in
+3 −3 linux/linux.hash
+1 −1 package/btrfs-progs/btrfs-progs.hash
+1 −2 package/btrfs-progs/btrfs-progs.mk
+2 −2 package/dropbear/S50dropbear
+2 −2 package/espeak/espeak.mk
+1 −1 package/fontconfig/fontconfig.mk
+1 −1 package/libcec/Config.in
+2 −2 package/libcec/libcec.mk
+1 −1 package/libcrossguid/libcrossguid.hash
+15 −22 package/libcrossguid/libcrossguid.mk
+3 −3 package/linux-headers/Config.in.host
+2 −2 package/mesa3d/mesa3d.hash
+1 −1 package/mesa3d/mesa3d.mk
+0 −2 package/mpv/Config.in
+1 −1 package/python-future/python-future.hash
+1 −1 package/python-future/python-future.mk
+1 −1 package/rpi-firmware/rpi-firmware.mk
+1 −1 package/rtl8188eu/rtl8188eu.mk
+2 −2 package/rtl8821au/rtl8821au.mk
+1 −1 package/rtl8821cu/rtl8821cu.mk
+1 −2 package/seatd/seatd.mk
+1 −1 package/triggerhappy/triggerhappy.mk
+1 −1 package/x11r7/libxcb/libxcb.mk
+1 −1 package/x11r7/xapp_xeyes/xapp_xeyes.mk
+1 −1 package/x11r7/xcb-proto/xcb-proto.mk
+1 −1 package/x11r7/xcb-util-cursor/xcb-util-cursor.mk
+1 −1 package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.mk
+1 −1 package/x11r7/xfont_font-util/xfont_font-util.mk
+1 −1 package/x11r7/xlib_libX11/xlib_libX11.mk
+1 −1 package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk
+1 −1 package/x11r7/xlib_libXext/xlib_libXext.mk
+1 −1 package/x11r7/xlib_libXrandr/xlib_libXrandr.mk
+1 −1 package/x11r7/xserver_xorg-server/xserver_xorg-server.mk
+1 −1 package/x11r7/xwayland/xwayland.mk
6 changes: 3 additions & 3 deletions package/core/rescue-system/rescue-system.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ define RESCUE_SYSTEM_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/dbus.sh $(TARGET_DIR)/etc/profile.d/dbus.sh

# Other scripts needed
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/batocera-mount $(TARGET_DIR)/usr/bin/
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/batocera-part $(TARGET_DIR)/usr/bin/
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/batocera-usbmount $(TARGET_DIR)/usr/bin/
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/system-mount $(TARGET_DIR)/usr/bin/
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/system-part $(TARGET_DIR)/usr/bin/
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_RESCUE_PATH)/package/core/rescue-system/system-usbmount $(TARGET_DIR)/usr/bin/

endef

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# batocera-mount [FSTYPE] [RWREQUIRED] [MOUNTDEVICE] [MOUNTPOINT]
# system-mount [FSTYPE] [RWREQUIRED] [MOUNTDEVICE] [MOUNTPOINT]

print_usage() {
echo "${0} [FSTYPE] [RWREQUIRED] [MOUNTDEVICE] [MOUNTPOINT]" >&2
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 24dbe10

Please # to comment.