Further integrate Archboxctl.

This commit is contained in:
lemniskett 2021-01-11 14:00:43 +07:00
parent eda8078a0f
commit cc1c3d46f6
3 changed files with 13 additions and 2 deletions

View File

@ -16,5 +16,15 @@ MOUNT_MOD="no"
LAZY_UMOUNT="no" LAZY_UMOUNT="no"
# Put your desired enviroment variable here, for example # Put your desired enviroment variable here, for example
#
# ENV_VAR="HOME=/var/home/lemniskett" # ENV_VAR="HOME=/var/home/lemniskett"
#
ENV_VAR="" ENV_VAR=""
# Parse a Systemd service and executes it on boot, order matters, for example
#
# SERVICES=(vmware-networks-configuration vmware-networks vmware-usbarbitrator nginx)
#
# Keep in mind that this doesn't resolve service dependencies, so you may need to
# enable the dependencies manually
SERVICES=()

View File

@ -34,7 +34,9 @@ case $1 in
[[ $MOUNT_RUN = "yes" ]] && rbind /run [[ $MOUNT_RUN = "yes" ]] && rbind /run
[[ $MOUNT_MOD = "yes" ]] && rbind /lib/modules && rbind /boot [[ $MOUNT_MOD = "yes" ]] && rbind /lib/modules && rbind /boot
[[ -d /var/lib/dbus ]] && rbind /var/lib/dbus [[ -d /var/lib/dbus ]] && rbind /var/lib/dbus
chroot $CHROOT /usr/local/bin/serviced >/dev/null 2>&1 for i in ${SERVICES[@]}; do
chroot $CHROOT /bin/su -c "/usr/local/bin/archboxctl exec $i" > /dev/null 2>&1
done
exit 0 exit 0
;; ;;
stop) stop)

1
install.sh Normal file → Executable file
View File

@ -8,7 +8,6 @@ install -v -D -m 755 ./copyresolv.bash /usr/local/share/archbox/bin/copyresolv
install -v -D -m 755 ./archboxcommand.bash /usr/local/share/archbox/bin/archbox install -v -D -m 755 ./archboxcommand.bash /usr/local/share/archbox/bin/archbox
install -v -D -m 755 ./remount_run.bash /usr/local/share/archbox/bin/remount_run install -v -D -m 755 ./remount_run.bash /usr/local/share/archbox/bin/remount_run
install -v -D -m 755 ./chroot_setup.bash /usr/local/share/archbox/chroot_setup.bash install -v -D -m 755 ./chroot_setup.bash /usr/local/share/archbox/chroot_setup.bash
install -v -D -m 755 ./archboxctl.bash /usr/local/share/archbox/archboxctl.bash
install -v -D -m 755 ./archboxinit.bash /usr/local/share/archbox/bin/archboxinit install -v -D -m 755 ./archboxinit.bash /usr/local/share/archbox/bin/archboxinit
[[ -z $1 ]] && exit 0 [[ -z $1 ]] && exit 0