2021-10-08 01:00:49 +00:00
|
|
|
|
#!/usr/bin/env bash
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
|
|
|
|
# BSD 3-Clause License
|
|
|
|
|
# Author @sonique6784
|
|
|
|
|
# Copyright (c) 2020, sonique6784
|
|
|
|
|
|
2020-11-08 00:10:09 +00:00
|
|
|
|
function showRaSCSILogo(){
|
|
|
|
|
logo="""
|
|
|
|
|
.~~. .~~.\n
|
|
|
|
|
'. \ ' ' / .'\n
|
|
|
|
|
.╔═══════╗.\n
|
|
|
|
|
: ║|¯¯¯¯¯|║ :\n
|
|
|
|
|
~ (║|_____|║) ~\n
|
|
|
|
|
( : ║ . __ ║ : )\n
|
|
|
|
|
~ .╚╦═════╦╝. ~\n
|
2022-08-26 00:59:57 +00:00
|
|
|
|
( ¯¯¯¯¯¯¯ ) RaSCSI Reloaded Assistant\n
|
2020-11-08 00:10:09 +00:00
|
|
|
|
'~ .~~~. ~'\n
|
|
|
|
|
'~'\n
|
|
|
|
|
"""
|
|
|
|
|
echo -e $logo
|
|
|
|
|
}
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf
* Formatted the Status column, and fixed the available ID logic
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Better handling of device status
* Updated parameter handling
* Updated setting default interfaces
* Revert "Updated setting default interfaces"
This reverts commit 210abc775d9a79dd0c631cf3877966a2923f4d5b.
* Revert "Updated parameter handling"
This reverts commit 35302addd59f5f5e1cc032888ba32dcbb426a846.
* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).
* Move id reservation back into __main__
* Remove check for device type when validating Removed image
* Leverage device property data for better status messages
* Remove redundant string sanitation when reading config csv file
* Clean up device list generation
* Cleanup
* Remove duplicates before building valid scsi id list
* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp
* rascsi supports reserving IDs
* Updated help message
* Replaced BOOL by bool
* Logging update
* Logging update
* Cleanup
* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself
* Remove redundant steps handled in Makefile
* Add the functionality to specify connect_type through a parameter
* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options
* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp
* Cleanup
* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter
* Improve on the network setup messages
* Fix routing address
* Add checks for previous configuration; cleanup
* Cleanup
* Remove redundant step in wired setup. Improve messages.
* Cleanup
* Added default parameters to device properties
* Return parameters a device was set up with
* Add flows for configuring custom network settings; adopting some logic by sonique6784
* Improved device initialization
* Updated default parameter handling
* Updated default parameter handling
* Fixed typo
* Comment updates
* Comment update
* Make iso generation work again, and add error handling to urllib actions
* Manage default parameters in the respective device
* Print available network interfaces. Clean up step and improve descriptive messages.
* Make the script clean up previous configurations
* Make the script only show relevant interfaces
* Partial translation of cfilesystem.cpp
* Do not pass empty parameter string
* Added supports_params flag
* Completely translate code comments in cfilesystem.cpp
* Show rascsi-web status after installing
* Refactoring
* Made comparisons more consistent
* Updated error handling
* Updated exception handling
* Made comparisons more consistent
* Updated error handling
* Overlooked code comment translation
* Renaming
* Better error handling for socket connection
* Disable two NEC hd image types due to issue#232
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Better handling of removable disks in the web ui
* Added stoppable property and stopped status
* Made MO stoppable
* Removed duplicate code
* Removed duplicate code
* Copy read-only property
* Renaming
* Add an assistant for reserving scsi ids
* Don't show action if no device attached
* Implement a device_info app path, and cut down on device columns always shown
* Cleanup
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Made disk_t private
* Made some data structures private
* Fixed ARM compile issue
* Fast forward instead of rebase existing git repo
* Fixed ctapdriver initialization issue
* Reset read-only status when opening an image file
* Cleanup
* Cleanup
* Made logging more consistent
* Updated log level
* Cleanup
* Log load/eject on error level for testing
* Revert "Log load/eject on error level for testing"
This reverts commit d35a15ea8e520517d25e1e1054ad1aeda9f85f2e.
* Assume drive is not ready after having been stopped
* Updated status handling
* Make the csv config files store all relevant device data for reading
* Read 9 column csv config files
* Fixed typo
* Rebuild manpage
* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)
* Removed unused code
* Enum data type update
* Removed duplicate range check
* Removed duplicate code
* Removed more duplicate code
* Logging update
* SCCD sector size was not meant to be configurable
* Better error handling for csv reading and writing
* Updated configurable sector size properties
* Removed assertion
* Improved error handling
* Updated error handling
* Re-added special error handling only relevant for SASI
* Added TODOs
* Comment update
* Added override modifier
* Removed obsolete debug flag (related code was not called)
* Comment and logging updates
* Removed obsolete try/catch
* Revert "Removed obsolete try/catch"
This reverts commit 39ca12d8b153c706316ce79f4fec65c9abc60024.
* Comment update
* Removed duplicate code
* Updated error messages, use more foreach loops
* Avoid storing RaSCSI generated product info in config file
* Updated logging
* Logging update
* Save config files in json instead of csv
* Fix bugs with json config loading
* Refactoring & remove unused code
* Refactoring
* Display upper case file endings in file management list
* Only show product vendor for non-RaSCSI devices in the device list
* Translate code comment
* Refactoring
* Fix bad identation
* Improve valid file extension handling
* Add validation when attaching removable media
* Display valid file endings under the file list
* Cleanup
* Don't store 0 block size
* Fix indentation
* Read and write config files in key:pair format
* Add section for controlling logging
* README update
* Added block_count
* Cleanup, fix typos
* Support attaching CD-ROM with custom block size
* Evaluate block size when inserting a media
* rasctl display capacity if available
* Info message update
* Use kwargs for device attachment
* Fix bugs in attach_image kwargs; make config file more readable
* POC for attaching device with profile
* Only list product types valid for the particular image file
* Perform validation of HDD image size based on the product profile
* Implement sidecar config files for drive images.
* Added missing product name to NEC vital product data
* MO block size depends on capacity only
* Better error handling for device sidecar config loading
* Extended property/status display
* Property display update
* Updated error handling
* Handle image sizes in bytes internally
* Revert change
* Resolve bad merge
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-15 02:51:12 +00:00
|
|
|
|
function showMacNetworkWired(){
|
|
|
|
|
logo="""
|
|
|
|
|
.-~-.-~~~-.~-.\n
|
|
|
|
|
╔═══════╗ .( )\n
|
|
|
|
|
║|¯¯¯¯¯|║ / \`.\n
|
|
|
|
|
║|_____|║>--------------<~ . )\n
|
|
|
|
|
║ . __ ║ ( :'-'\n
|
|
|
|
|
╚╦═════╦╝ ~-.________.:'\n
|
|
|
|
|
¯¯¯¯¯¯¯\n
|
|
|
|
|
"""
|
|
|
|
|
echo -e $logo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showMacNetworkWireless(){
|
|
|
|
|
logo="""
|
|
|
|
|
.-~-.-~~~-.~-.\n
|
|
|
|
|
╔═══════╗ .( .( )\n
|
|
|
|
|
║|¯¯¯¯¯|║ .( .( / \`.\n
|
|
|
|
|
║|_____|║ .o o ~ . )\n
|
|
|
|
|
║ . __ ║ '( '( ( :'-'\n
|
|
|
|
|
╚╦═════╦╝ '( ~-.________.:'\n
|
|
|
|
|
¯¯¯¯¯¯¯\n
|
|
|
|
|
"""
|
|
|
|
|
echo -e $logo
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-09 02:33:33 +00:00
|
|
|
|
USER=$(whoami)
|
|
|
|
|
BASE=$(dirname "$(readlink -f "${0}")")
|
2022-10-25 19:59:30 +00:00
|
|
|
|
CPP_PATH="$BASE/cpp"
|
2021-10-08 01:00:49 +00:00
|
|
|
|
VIRTUAL_DRIVER_PATH="$HOME/images"
|
2021-10-06 01:58:49 +00:00
|
|
|
|
CFG_PATH="$HOME/.config/rascsi"
|
2022-01-09 14:26:28 +00:00
|
|
|
|
WEB_INSTALL_PATH="$BASE/python/web"
|
|
|
|
|
OLED_INSTALL_PATH="$BASE/python/oled"
|
2022-02-25 20:03:36 +00:00
|
|
|
|
CTRLBOARD_INSTALL_PATH="$BASE/python/ctrlboard"
|
2022-01-21 23:08:29 +00:00
|
|
|
|
PYTHON_COMMON_PATH="$BASE/python/common"
|
2021-12-03 01:18:45 +00:00
|
|
|
|
SYSTEMD_PATH="/etc/systemd/system"
|
2022-08-01 12:47:23 +00:00
|
|
|
|
SSL_CERTS_PATH="/etc/ssl/certs"
|
|
|
|
|
SSL_KEYS_PATH="/etc/ssl/private"
|
2020-11-08 00:10:09 +00:00
|
|
|
|
HFS_FORMAT=/usr/bin/hformat
|
|
|
|
|
HFDISK_BIN=/usr/bin/hfdisk
|
2021-10-14 01:01:13 +00:00
|
|
|
|
LIDO_DRIVER=$BASE/lido-driver.img
|
2021-03-07 15:52:04 +00:00
|
|
|
|
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
2021-07-31 15:52:09 +00:00
|
|
|
|
GIT_REMOTE=${GIT_REMOTE:-origin}
|
2021-12-23 17:12:16 +00:00
|
|
|
|
TOKEN=""
|
2022-08-28 13:51:31 +00:00
|
|
|
|
SECRET_FILE="$HOME/.config/rascsi/rascsi_secret"
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
2021-09-28 17:56:14 +00:00
|
|
|
|
set -e
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# checks to run before entering the script main menu
|
2021-11-14 19:57:38 +00:00
|
|
|
|
function initialChecks() {
|
|
|
|
|
if [ "root" == "$USER" ]; then
|
|
|
|
|
echo "Do not run this script as $USER or with 'sudo'."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# checks that the current user has sudoers privileges
|
|
|
|
|
function sudoCheck() {
|
|
|
|
|
echo "Input your password to allow this script to make the above changes."
|
|
|
|
|
sudo -v
|
|
|
|
|
}
|
|
|
|
|
|
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf
* Formatted the Status column, and fixed the available ID logic
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Better handling of device status
* Updated parameter handling
* Updated setting default interfaces
* Revert "Updated setting default interfaces"
This reverts commit 210abc775d9a79dd0c631cf3877966a2923f4d5b.
* Revert "Updated parameter handling"
This reverts commit 35302addd59f5f5e1cc032888ba32dcbb426a846.
* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).
* Move id reservation back into __main__
* Remove check for device type when validating Removed image
* Leverage device property data for better status messages
* Remove redundant string sanitation when reading config csv file
* Clean up device list generation
* Cleanup
* Remove duplicates before building valid scsi id list
* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp
* rascsi supports reserving IDs
* Updated help message
* Replaced BOOL by bool
* Logging update
* Logging update
* Cleanup
* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself
* Remove redundant steps handled in Makefile
* Add the functionality to specify connect_type through a parameter
* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options
* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp
* Cleanup
* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter
* Improve on the network setup messages
* Fix routing address
* Add checks for previous configuration; cleanup
* Cleanup
* Remove redundant step in wired setup. Improve messages.
* Cleanup
* Added default parameters to device properties
* Return parameters a device was set up with
* Add flows for configuring custom network settings; adopting some logic by sonique6784
* Improved device initialization
* Updated default parameter handling
* Updated default parameter handling
* Fixed typo
* Comment updates
* Comment update
* Make iso generation work again, and add error handling to urllib actions
* Manage default parameters in the respective device
* Print available network interfaces. Clean up step and improve descriptive messages.
* Make the script clean up previous configurations
* Make the script only show relevant interfaces
* Partial translation of cfilesystem.cpp
* Do not pass empty parameter string
* Added supports_params flag
* Completely translate code comments in cfilesystem.cpp
* Show rascsi-web status after installing
* Refactoring
* Made comparisons more consistent
* Updated error handling
* Updated exception handling
* Made comparisons more consistent
* Updated error handling
* Overlooked code comment translation
* Renaming
* Better error handling for socket connection
* Disable two NEC hd image types due to issue#232
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Better handling of removable disks in the web ui
* Added stoppable property and stopped status
* Made MO stoppable
* Removed duplicate code
* Removed duplicate code
* Copy read-only property
* Renaming
* Add an assistant for reserving scsi ids
* Don't show action if no device attached
* Implement a device_info app path, and cut down on device columns always shown
* Cleanup
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Made disk_t private
* Made some data structures private
* Fixed ARM compile issue
* Fast forward instead of rebase existing git repo
* Fixed ctapdriver initialization issue
* Reset read-only status when opening an image file
* Cleanup
* Cleanup
* Made logging more consistent
* Updated log level
* Cleanup
* Log load/eject on error level for testing
* Revert "Log load/eject on error level for testing"
This reverts commit d35a15ea8e520517d25e1e1054ad1aeda9f85f2e.
* Assume drive is not ready after having been stopped
* Updated status handling
* Make the csv config files store all relevant device data for reading
* Read 9 column csv config files
* Fixed typo
* Rebuild manpage
* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)
* Removed unused code
* Enum data type update
* Removed duplicate range check
* Removed duplicate code
* Removed more duplicate code
* Logging update
* SCCD sector size was not meant to be configurable
* Better error handling for csv reading and writing
* Updated configurable sector size properties
* Removed assertion
* Improved error handling
* Updated error handling
* Re-added special error handling only relevant for SASI
* Added TODOs
* Comment update
* Added override modifier
* Removed obsolete debug flag (related code was not called)
* Comment and logging updates
* Removed obsolete try/catch
* Revert "Removed obsolete try/catch"
This reverts commit 39ca12d8b153c706316ce79f4fec65c9abc60024.
* Comment update
* Removed duplicate code
* Updated error messages, use more foreach loops
* Avoid storing RaSCSI generated product info in config file
* Updated logging
* Logging update
* Save config files in json instead of csv
* Fix bugs with json config loading
* Refactoring & remove unused code
* Refactoring
* Display upper case file endings in file management list
* Only show product vendor for non-RaSCSI devices in the device list
* Translate code comment
* Refactoring
* Fix bad identation
* Improve valid file extension handling
* Add validation when attaching removable media
* Display valid file endings under the file list
* Cleanup
* Don't store 0 block size
* Fix indentation
* Read and write config files in key:pair format
* Add section for controlling logging
* README update
* Added block_count
* Cleanup, fix typos
* Support attaching CD-ROM with custom block size
* Evaluate block size when inserting a media
* rasctl display capacity if available
* Info message update
* Use kwargs for device attachment
* Fix bugs in attach_image kwargs; make config file more readable
* POC for attaching device with profile
* Only list product types valid for the particular image file
* Perform validation of HDD image size based on the product profile
* Implement sidecar config files for drive images.
* Added missing product name to NEC vital product data
* MO block size depends on capacity only
* Better error handling for device sidecar config loading
* Extended property/status display
* Property display update
* Updated error handling
* Handle image sizes in bytes internally
* Revert change
* Resolve bad merge
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-15 02:51:12 +00:00
|
|
|
|
# install all dependency packages for RaSCSI Service
|
2021-02-01 18:24:59 +00:00
|
|
|
|
function installPackages() {
|
2022-08-28 13:51:31 +00:00
|
|
|
|
sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -qq \
|
|
|
|
|
build-essential \
|
|
|
|
|
git \
|
|
|
|
|
libspdlog-dev \
|
|
|
|
|
libpcap-dev \
|
|
|
|
|
libprotobuf-dev \
|
|
|
|
|
genisoimage \
|
|
|
|
|
python3 \
|
|
|
|
|
python3-dev \
|
|
|
|
|
python3-pip \
|
|
|
|
|
python3-venv \
|
|
|
|
|
python3-setuptools \
|
|
|
|
|
python3-wheel \
|
|
|
|
|
nginx-light \
|
|
|
|
|
protobuf-compiler \
|
|
|
|
|
bridge-utils \
|
|
|
|
|
libev-dev \
|
|
|
|
|
libevdev2 \
|
|
|
|
|
unzip \
|
|
|
|
|
unar \
|
|
|
|
|
disktype \
|
2022-10-04 13:38:15 +00:00
|
|
|
|
libgmock-dev \
|
|
|
|
|
man2html
|
2022-08-28 13:51:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# install Debian packges for RaSCSI standalone
|
|
|
|
|
function installPackagesStandalone() {
|
|
|
|
|
sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -qq \
|
|
|
|
|
build-essential \
|
|
|
|
|
libspdlog-dev \
|
|
|
|
|
libpcap-dev \
|
|
|
|
|
libprotobuf-dev \
|
|
|
|
|
protobuf-compiler \
|
|
|
|
|
disktype \
|
2022-10-04 13:38:15 +00:00
|
|
|
|
libgmock-dev \
|
|
|
|
|
man2html
|
2021-02-01 18:24:59 +00:00
|
|
|
|
}
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
2022-07-31 01:59:52 +00:00
|
|
|
|
# cache the pip packages
|
|
|
|
|
function cachePipPackages(){
|
|
|
|
|
pushd $WEB_INSTALL_PATH
|
|
|
|
|
# Refresh the sudo authentication, which shouldn't trigger another password prompt
|
|
|
|
|
sudo -v
|
2022-08-26 00:59:57 +00:00
|
|
|
|
sudo pip3 install -r ./requirements.txt
|
2022-07-31 01:59:52 +00:00
|
|
|
|
popd
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# compile the RaSCSI binaries
|
|
|
|
|
function compileRaScsi() {
|
2022-10-25 19:59:30 +00:00
|
|
|
|
cd "$CPP_PATH" || exit 1
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
echo "Compiling with ${CORES:-1} simultaneous cores..."
|
2022-02-04 01:40:15 +00:00
|
|
|
|
make clean </dev/null
|
2022-07-29 05:48:18 +00:00
|
|
|
|
|
|
|
|
|
# Refresh the sudo authentication, which shouldn't trigger another password prompt
|
2022-02-04 01:40:15 +00:00
|
|
|
|
sudo -v
|
|
|
|
|
make -j "${CORES:-1}" all CONNECT_TYPE="${CONNECT_TYPE:-FULLSPEC}" </dev/null
|
2021-11-19 02:17:24 +00:00
|
|
|
|
}
|
2021-10-21 05:06:00 +00:00
|
|
|
|
|
2022-01-29 19:06:10 +00:00
|
|
|
|
function cleanupOutdatedManPage() {
|
|
|
|
|
OUTDATED_MAN_PAGE_DIR=/usr/share/man/man1/
|
|
|
|
|
if [ -f "${OUTDATED_MAN_PAGE_DIR}/$1" ]; then
|
|
|
|
|
sudo rm "${OUTDATED_MAN_PAGE_DIR}/$1"
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# install the RaSCSI binaries and modify the service configuration
|
|
|
|
|
function installRaScsi() {
|
2022-01-29 19:06:10 +00:00
|
|
|
|
# clean up outdated man pages if they exist
|
|
|
|
|
cleanupOutdatedManPage "rascsi.1"
|
|
|
|
|
cleanupOutdatedManPage "rasctl.1"
|
|
|
|
|
cleanupOutdatedManPage "scsimon.1"
|
|
|
|
|
cleanupOutdatedManPage "rasdump.1"
|
|
|
|
|
cleanupOutdatedManPage "sasidump.1"
|
2022-10-22 02:49:53 +00:00
|
|
|
|
|
2022-01-29 19:06:10 +00:00
|
|
|
|
# install
|
2021-11-19 02:17:24 +00:00
|
|
|
|
sudo make install CONNECT_TYPE="${CONNECT_TYPE:-FULLSPEC}" </dev/null
|
2022-10-22 02:49:53 +00:00
|
|
|
|
|
|
|
|
|
# update launch parameters
|
|
|
|
|
if [[ -f $SECRET_FILE ]]; then
|
|
|
|
|
sudo sed -i "\@^ExecStart.*@ s@@& -F $VIRTUAL_DRIVER_PATH -P $SECRET_FILE@" "$SYSTEMD_PATH/rascsi.service"
|
|
|
|
|
echo "Secret token file $SECRET_FILE detected. Using it to enable back-end authentication."
|
|
|
|
|
else
|
|
|
|
|
sudo sed -i "\@^ExecStart.*@ s@@& -F $VIRTUAL_DRIVER_PATH@" "$SYSTEMD_PATH/rascsi.service"
|
|
|
|
|
fi
|
|
|
|
|
echo "Configured rascsi.service to use $VIRTUAL_DRIVER_PATH as default image dir."
|
2020-12-31 01:39:32 +00:00
|
|
|
|
}
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
2022-01-21 23:08:29 +00:00
|
|
|
|
function preparePythonCommon() {
|
2022-02-14 23:30:33 +00:00
|
|
|
|
if [ -f "$WEB_INSTALL_PATH/src/rascsi_interface_pb2.py" ]; then
|
|
|
|
|
sudo rm "$WEB_INSTALL_PATH/src/rascsi_interface_pb2.py"
|
|
|
|
|
echo "Deleting old Python protobuf library $WEB_INSTALL_PATH/src/rascsi_interface_pb2.py"
|
|
|
|
|
fi
|
|
|
|
|
if [ -f "$OLED_INSTALL_PATH/src/rascsi_interface_pb2.py" ]; then
|
|
|
|
|
sudo rm "$OLED_INSTALL_PATH/src/rascsi_interface_pb2.py"
|
|
|
|
|
echo "Deleting old Python protobuf library $OLED_INSTALL_PATH/src/rascsi_interface_pb2.py"
|
|
|
|
|
fi
|
|
|
|
|
if [ -f "$PYTHON_COMMON_PATH/src/rascsi_interface_pb2.py" ]; then
|
|
|
|
|
sudo rm "$PYTHON_COMMON_PATH/src/rascsi_interface_pb2.py"
|
|
|
|
|
echo "Deleting old Python protobuf library $PYTHON_COMMON_PATH/src/rascsi_interface_pb2.py"
|
2021-09-28 17:56:14 +00:00
|
|
|
|
fi
|
|
|
|
|
echo "Compiling the Python protobuf library rascsi_interface_pb2.py..."
|
2022-10-25 19:59:30 +00:00
|
|
|
|
protoc -I="$CPP_PATH" --python_out="$PYTHON_COMMON_PATH/src" rascsi_interface.proto
|
2022-01-21 23:08:29 +00:00
|
|
|
|
}
|
2021-10-08 01:00:49 +00:00
|
|
|
|
|
2022-01-21 23:08:29 +00:00
|
|
|
|
# install everything required to run an HTTP server (Nginx + Python Flask App)
|
|
|
|
|
function installRaScsiWebInterface() {
|
2022-01-09 14:26:28 +00:00
|
|
|
|
sudo cp -f "$WEB_INSTALL_PATH/service-infra/nginx-default.conf" /etc/nginx/sites-available/default
|
|
|
|
|
sudo cp -f "$WEB_INSTALL_PATH/service-infra/502.html" /var/www/html/502.html
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
2021-11-09 02:33:33 +00:00
|
|
|
|
sudo usermod -a -G $USER www-data
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
2022-08-01 12:47:23 +00:00
|
|
|
|
if [ -f "$SSL_CERTS_PATH/rascsi-web.crt" ]; then
|
|
|
|
|
echo "SSL certificate $SSL_CERTS_PATH/rascsi-web.crt already exists."
|
|
|
|
|
else
|
|
|
|
|
echo "SSL certificate $SSL_CERTS_PATH/rascsi-web.crt does not exist; creating self-signed certificate..."
|
|
|
|
|
sudo mkdir -p "$SSL_CERTS_PATH" || true
|
|
|
|
|
sudo mkdir -p "$SSL_KEYS_PATH" || true
|
|
|
|
|
sudo openssl req -x509 -nodes -sha256 -days 3650 \
|
|
|
|
|
-newkey rsa:4096 \
|
|
|
|
|
-keyout "$SSL_KEYS_PATH/rascsi-web.key" \
|
|
|
|
|
-out "$SSL_CERTS_PATH/rascsi-web.crt" \
|
|
|
|
|
-subj '/CN=rascsi' \
|
|
|
|
|
-addext 'subjectAltName=DNS:rascsi' \
|
|
|
|
|
-addext 'extendedKeyUsage=serverAuth'
|
|
|
|
|
fi
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
sudo systemctl reload nginx || true
|
2020-12-31 01:39:32 +00:00
|
|
|
|
}
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# Creates the dir that RaSCSI uses to store image files
|
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf
* Formatted the Status column, and fixed the available ID logic
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Better handling of device status
* Updated parameter handling
* Updated setting default interfaces
* Revert "Updated setting default interfaces"
This reverts commit 210abc775d9a79dd0c631cf3877966a2923f4d5b.
* Revert "Updated parameter handling"
This reverts commit 35302addd59f5f5e1cc032888ba32dcbb426a846.
* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).
* Move id reservation back into __main__
* Remove check for device type when validating Removed image
* Leverage device property data for better status messages
* Remove redundant string sanitation when reading config csv file
* Clean up device list generation
* Cleanup
* Remove duplicates before building valid scsi id list
* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp
* rascsi supports reserving IDs
* Updated help message
* Replaced BOOL by bool
* Logging update
* Logging update
* Cleanup
* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself
* Remove redundant steps handled in Makefile
* Add the functionality to specify connect_type through a parameter
* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options
* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp
* Cleanup
* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter
* Improve on the network setup messages
* Fix routing address
* Add checks for previous configuration; cleanup
* Cleanup
* Remove redundant step in wired setup. Improve messages.
* Cleanup
* Added default parameters to device properties
* Return parameters a device was set up with
* Add flows for configuring custom network settings; adopting some logic by sonique6784
* Improved device initialization
* Updated default parameter handling
* Updated default parameter handling
* Fixed typo
* Comment updates
* Comment update
* Make iso generation work again, and add error handling to urllib actions
* Manage default parameters in the respective device
* Print available network interfaces. Clean up step and improve descriptive messages.
* Make the script clean up previous configurations
* Make the script only show relevant interfaces
* Partial translation of cfilesystem.cpp
* Do not pass empty parameter string
* Added supports_params flag
* Completely translate code comments in cfilesystem.cpp
* Show rascsi-web status after installing
* Refactoring
* Made comparisons more consistent
* Updated error handling
* Updated exception handling
* Made comparisons more consistent
* Updated error handling
* Overlooked code comment translation
* Renaming
* Better error handling for socket connection
* Disable two NEC hd image types due to issue#232
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Better handling of removable disks in the web ui
* Added stoppable property and stopped status
* Made MO stoppable
* Removed duplicate code
* Removed duplicate code
* Copy read-only property
* Renaming
* Add an assistant for reserving scsi ids
* Don't show action if no device attached
* Implement a device_info app path, and cut down on device columns always shown
* Cleanup
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Made disk_t private
* Made some data structures private
* Fixed ARM compile issue
* Fast forward instead of rebase existing git repo
* Fixed ctapdriver initialization issue
* Reset read-only status when opening an image file
* Cleanup
* Cleanup
* Made logging more consistent
* Updated log level
* Cleanup
* Log load/eject on error level for testing
* Revert "Log load/eject on error level for testing"
This reverts commit d35a15ea8e520517d25e1e1054ad1aeda9f85f2e.
* Assume drive is not ready after having been stopped
* Updated status handling
* Make the csv config files store all relevant device data for reading
* Read 9 column csv config files
* Fixed typo
* Rebuild manpage
* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)
* Removed unused code
* Enum data type update
* Removed duplicate range check
* Removed duplicate code
* Removed more duplicate code
* Logging update
* SCCD sector size was not meant to be configurable
* Better error handling for csv reading and writing
* Updated configurable sector size properties
* Removed assertion
* Improved error handling
* Updated error handling
* Re-added special error handling only relevant for SASI
* Added TODOs
* Comment update
* Added override modifier
* Removed obsolete debug flag (related code was not called)
* Comment and logging updates
* Removed obsolete try/catch
* Revert "Removed obsolete try/catch"
This reverts commit 39ca12d8b153c706316ce79f4fec65c9abc60024.
* Comment update
* Removed duplicate code
* Updated error messages, use more foreach loops
* Avoid storing RaSCSI generated product info in config file
* Updated logging
* Logging update
* Save config files in json instead of csv
* Fix bugs with json config loading
* Refactoring & remove unused code
* Refactoring
* Display upper case file endings in file management list
* Only show product vendor for non-RaSCSI devices in the device list
* Translate code comment
* Refactoring
* Fix bad identation
* Improve valid file extension handling
* Add validation when attaching removable media
* Display valid file endings under the file list
* Cleanup
* Don't store 0 block size
* Fix indentation
* Read and write config files in key:pair format
* Add section for controlling logging
* README update
* Added block_count
* Cleanup, fix typos
* Support attaching CD-ROM with custom block size
* Evaluate block size when inserting a media
* rasctl display capacity if available
* Info message update
* Use kwargs for device attachment
* Fix bugs in attach_image kwargs; make config file more readable
* POC for attaching device with profile
* Only list product types valid for the particular image file
* Perform validation of HDD image size based on the product profile
* Implement sidecar config files for drive images.
* Added missing product name to NEC vital product data
* MO block size depends on capacity only
* Better error handling for device sidecar config loading
* Extended property/status display
* Property display update
* Updated error handling
* Handle image sizes in bytes internally
* Revert change
* Resolve bad merge
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-15 02:51:12 +00:00
|
|
|
|
function createImagesDir() {
|
2021-10-08 01:00:49 +00:00
|
|
|
|
if [ -d "$VIRTUAL_DRIVER_PATH" ]; then
|
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf
* Formatted the Status column, and fixed the available ID logic
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Better handling of device status
* Updated parameter handling
* Updated setting default interfaces
* Revert "Updated setting default interfaces"
This reverts commit 210abc775d9a79dd0c631cf3877966a2923f4d5b.
* Revert "Updated parameter handling"
This reverts commit 35302addd59f5f5e1cc032888ba32dcbb426a846.
* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).
* Move id reservation back into __main__
* Remove check for device type when validating Removed image
* Leverage device property data for better status messages
* Remove redundant string sanitation when reading config csv file
* Clean up device list generation
* Cleanup
* Remove duplicates before building valid scsi id list
* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp
* rascsi supports reserving IDs
* Updated help message
* Replaced BOOL by bool
* Logging update
* Logging update
* Cleanup
* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself
* Remove redundant steps handled in Makefile
* Add the functionality to specify connect_type through a parameter
* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options
* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp
* Cleanup
* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter
* Improve on the network setup messages
* Fix routing address
* Add checks for previous configuration; cleanup
* Cleanup
* Remove redundant step in wired setup. Improve messages.
* Cleanup
* Added default parameters to device properties
* Return parameters a device was set up with
* Add flows for configuring custom network settings; adopting some logic by sonique6784
* Improved device initialization
* Updated default parameter handling
* Updated default parameter handling
* Fixed typo
* Comment updates
* Comment update
* Make iso generation work again, and add error handling to urllib actions
* Manage default parameters in the respective device
* Print available network interfaces. Clean up step and improve descriptive messages.
* Make the script clean up previous configurations
* Make the script only show relevant interfaces
* Partial translation of cfilesystem.cpp
* Do not pass empty parameter string
* Added supports_params flag
* Completely translate code comments in cfilesystem.cpp
* Show rascsi-web status after installing
* Refactoring
* Made comparisons more consistent
* Updated error handling
* Updated exception handling
* Made comparisons more consistent
* Updated error handling
* Overlooked code comment translation
* Renaming
* Better error handling for socket connection
* Disable two NEC hd image types due to issue#232
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Better handling of removable disks in the web ui
* Added stoppable property and stopped status
* Made MO stoppable
* Removed duplicate code
* Removed duplicate code
* Copy read-only property
* Renaming
* Add an assistant for reserving scsi ids
* Don't show action if no device attached
* Implement a device_info app path, and cut down on device columns always shown
* Cleanup
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Made disk_t private
* Made some data structures private
* Fixed ARM compile issue
* Fast forward instead of rebase existing git repo
* Fixed ctapdriver initialization issue
* Reset read-only status when opening an image file
* Cleanup
* Cleanup
* Made logging more consistent
* Updated log level
* Cleanup
* Log load/eject on error level for testing
* Revert "Log load/eject on error level for testing"
This reverts commit d35a15ea8e520517d25e1e1054ad1aeda9f85f2e.
* Assume drive is not ready after having been stopped
* Updated status handling
* Make the csv config files store all relevant device data for reading
* Read 9 column csv config files
* Fixed typo
* Rebuild manpage
* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)
* Removed unused code
* Enum data type update
* Removed duplicate range check
* Removed duplicate code
* Removed more duplicate code
* Logging update
* SCCD sector size was not meant to be configurable
* Better error handling for csv reading and writing
* Updated configurable sector size properties
* Removed assertion
* Improved error handling
* Updated error handling
* Re-added special error handling only relevant for SASI
* Added TODOs
* Comment update
* Added override modifier
* Removed obsolete debug flag (related code was not called)
* Comment and logging updates
* Removed obsolete try/catch
* Revert "Removed obsolete try/catch"
This reverts commit 39ca12d8b153c706316ce79f4fec65c9abc60024.
* Comment update
* Removed duplicate code
* Updated error messages, use more foreach loops
* Avoid storing RaSCSI generated product info in config file
* Updated logging
* Logging update
* Save config files in json instead of csv
* Fix bugs with json config loading
* Refactoring & remove unused code
* Refactoring
* Display upper case file endings in file management list
* Only show product vendor for non-RaSCSI devices in the device list
* Translate code comment
* Refactoring
* Fix bad identation
* Improve valid file extension handling
* Add validation when attaching removable media
* Display valid file endings under the file list
* Cleanup
* Don't store 0 block size
* Fix indentation
* Read and write config files in key:pair format
* Add section for controlling logging
* README update
* Added block_count
* Cleanup, fix typos
* Support attaching CD-ROM with custom block size
* Evaluate block size when inserting a media
* rasctl display capacity if available
* Info message update
* Use kwargs for device attachment
* Fix bugs in attach_image kwargs; make config file more readable
* POC for attaching device with profile
* Only list product types valid for the particular image file
* Perform validation of HDD image size based on the product profile
* Implement sidecar config files for drive images.
* Added missing product name to NEC vital product data
* MO block size depends on capacity only
* Better error handling for device sidecar config loading
* Extended property/status display
* Property display update
* Updated error handling
* Handle image sizes in bytes internally
* Revert change
* Resolve bad merge
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-15 02:51:12 +00:00
|
|
|
|
echo "The $VIRTUAL_DRIVER_PATH directory already exists."
|
|
|
|
|
else
|
|
|
|
|
echo "The $VIRTUAL_DRIVER_PATH directory does not exist; creating..."
|
2021-10-08 01:00:49 +00:00
|
|
|
|
mkdir -p "$VIRTUAL_DRIVER_PATH"
|
|
|
|
|
chmod -R 775 "$VIRTUAL_DRIVER_PATH"
|
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf
* Formatted the Status column, and fixed the available ID logic
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Better handling of device status
* Updated parameter handling
* Updated setting default interfaces
* Revert "Updated setting default interfaces"
This reverts commit 210abc775d9a79dd0c631cf3877966a2923f4d5b.
* Revert "Updated parameter handling"
This reverts commit 35302addd59f5f5e1cc032888ba32dcbb426a846.
* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).
* Move id reservation back into __main__
* Remove check for device type when validating Removed image
* Leverage device property data for better status messages
* Remove redundant string sanitation when reading config csv file
* Clean up device list generation
* Cleanup
* Remove duplicates before building valid scsi id list
* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp
* rascsi supports reserving IDs
* Updated help message
* Replaced BOOL by bool
* Logging update
* Logging update
* Cleanup
* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself
* Remove redundant steps handled in Makefile
* Add the functionality to specify connect_type through a parameter
* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options
* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp
* Cleanup
* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter
* Improve on the network setup messages
* Fix routing address
* Add checks for previous configuration; cleanup
* Cleanup
* Remove redundant step in wired setup. Improve messages.
* Cleanup
* Added default parameters to device properties
* Return parameters a device was set up with
* Add flows for configuring custom network settings; adopting some logic by sonique6784
* Improved device initialization
* Updated default parameter handling
* Updated default parameter handling
* Fixed typo
* Comment updates
* Comment update
* Make iso generation work again, and add error handling to urllib actions
* Manage default parameters in the respective device
* Print available network interfaces. Clean up step and improve descriptive messages.
* Make the script clean up previous configurations
* Make the script only show relevant interfaces
* Partial translation of cfilesystem.cpp
* Do not pass empty parameter string
* Added supports_params flag
* Completely translate code comments in cfilesystem.cpp
* Show rascsi-web status after installing
* Refactoring
* Made comparisons more consistent
* Updated error handling
* Updated exception handling
* Made comparisons more consistent
* Updated error handling
* Overlooked code comment translation
* Renaming
* Better error handling for socket connection
* Disable two NEC hd image types due to issue#232
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Better handling of removable disks in the web ui
* Added stoppable property and stopped status
* Made MO stoppable
* Removed duplicate code
* Removed duplicate code
* Copy read-only property
* Renaming
* Add an assistant for reserving scsi ids
* Don't show action if no device attached
* Implement a device_info app path, and cut down on device columns always shown
* Cleanup
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Made disk_t private
* Made some data structures private
* Fixed ARM compile issue
* Fast forward instead of rebase existing git repo
* Fixed ctapdriver initialization issue
* Reset read-only status when opening an image file
* Cleanup
* Cleanup
* Made logging more consistent
* Updated log level
* Cleanup
* Log load/eject on error level for testing
* Revert "Log load/eject on error level for testing"
This reverts commit d35a15ea8e520517d25e1e1054ad1aeda9f85f2e.
* Assume drive is not ready after having been stopped
* Updated status handling
* Make the csv config files store all relevant device data for reading
* Read 9 column csv config files
* Fixed typo
* Rebuild manpage
* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)
* Removed unused code
* Enum data type update
* Removed duplicate range check
* Removed duplicate code
* Removed more duplicate code
* Logging update
* SCCD sector size was not meant to be configurable
* Better error handling for csv reading and writing
* Updated configurable sector size properties
* Removed assertion
* Improved error handling
* Updated error handling
* Re-added special error handling only relevant for SASI
* Added TODOs
* Comment update
* Added override modifier
* Removed obsolete debug flag (related code was not called)
* Comment and logging updates
* Removed obsolete try/catch
* Revert "Removed obsolete try/catch"
This reverts commit 39ca12d8b153c706316ce79f4fec65c9abc60024.
* Comment update
* Removed duplicate code
* Updated error messages, use more foreach loops
* Avoid storing RaSCSI generated product info in config file
* Updated logging
* Logging update
* Save config files in json instead of csv
* Fix bugs with json config loading
* Refactoring & remove unused code
* Refactoring
* Display upper case file endings in file management list
* Only show product vendor for non-RaSCSI devices in the device list
* Translate code comment
* Refactoring
* Fix bad identation
* Improve valid file extension handling
* Add validation when attaching removable media
* Display valid file endings under the file list
* Cleanup
* Don't store 0 block size
* Fix indentation
* Read and write config files in key:pair format
* Add section for controlling logging
* README update
* Added block_count
* Cleanup, fix typos
* Support attaching CD-ROM with custom block size
* Evaluate block size when inserting a media
* rasctl display capacity if available
* Info message update
* Use kwargs for device attachment
* Fix bugs in attach_image kwargs; make config file more readable
* POC for attaching device with profile
* Only list product types valid for the particular image file
* Perform validation of HDD image size based on the product profile
* Implement sidecar config files for drive images.
* Added missing product name to NEC vital product data
* MO block size depends on capacity only
* Better error handling for device sidecar config loading
* Extended property/status display
* Property display update
* Updated error handling
* Handle image sizes in bytes internally
* Revert change
* Resolve bad merge
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-15 02:51:12 +00:00
|
|
|
|
fi
|
2021-11-19 02:17:24 +00:00
|
|
|
|
}
|
2021-10-06 01:58:49 +00:00
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# Creates the dir that the Web Interface uses to store configuration files
|
|
|
|
|
function createCfgDir() {
|
2021-10-08 01:00:49 +00:00
|
|
|
|
if [ -d "$CFG_PATH" ]; then
|
2021-10-06 01:58:49 +00:00
|
|
|
|
echo "The $CFG_PATH directory already exists."
|
|
|
|
|
else
|
|
|
|
|
echo "The $CFG_PATH directory does not exist; creating..."
|
2021-10-08 01:00:49 +00:00
|
|
|
|
mkdir -p "$CFG_PATH"
|
|
|
|
|
chmod -R 775 "$CFG_PATH"
|
2021-10-06 01:58:49 +00:00
|
|
|
|
fi
|
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf
* Formatted the Status column, and fixed the available ID logic
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Better handling of device status
* Updated parameter handling
* Updated setting default interfaces
* Revert "Updated setting default interfaces"
This reverts commit 210abc775d9a79dd0c631cf3877966a2923f4d5b.
* Revert "Updated parameter handling"
This reverts commit 35302addd59f5f5e1cc032888ba32dcbb426a846.
* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).
* Move id reservation back into __main__
* Remove check for device type when validating Removed image
* Leverage device property data for better status messages
* Remove redundant string sanitation when reading config csv file
* Clean up device list generation
* Cleanup
* Remove duplicates before building valid scsi id list
* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp
* rascsi supports reserving IDs
* Updated help message
* Replaced BOOL by bool
* Logging update
* Logging update
* Cleanup
* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself
* Remove redundant steps handled in Makefile
* Add the functionality to specify connect_type through a parameter
* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options
* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp
* Cleanup
* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter
* Improve on the network setup messages
* Fix routing address
* Add checks for previous configuration; cleanup
* Cleanup
* Remove redundant step in wired setup. Improve messages.
* Cleanup
* Added default parameters to device properties
* Return parameters a device was set up with
* Add flows for configuring custom network settings; adopting some logic by sonique6784
* Improved device initialization
* Updated default parameter handling
* Updated default parameter handling
* Fixed typo
* Comment updates
* Comment update
* Make iso generation work again, and add error handling to urllib actions
* Manage default parameters in the respective device
* Print available network interfaces. Clean up step and improve descriptive messages.
* Make the script clean up previous configurations
* Make the script only show relevant interfaces
* Partial translation of cfilesystem.cpp
* Do not pass empty parameter string
* Added supports_params flag
* Completely translate code comments in cfilesystem.cpp
* Show rascsi-web status after installing
* Refactoring
* Made comparisons more consistent
* Updated error handling
* Updated exception handling
* Made comparisons more consistent
* Updated error handling
* Overlooked code comment translation
* Renaming
* Better error handling for socket connection
* Disable two NEC hd image types due to issue#232
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Better handling of removable disks in the web ui
* Added stoppable property and stopped status
* Made MO stoppable
* Removed duplicate code
* Removed duplicate code
* Copy read-only property
* Renaming
* Add an assistant for reserving scsi ids
* Don't show action if no device attached
* Implement a device_info app path, and cut down on device columns always shown
* Cleanup
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Made disk_t private
* Made some data structures private
* Fixed ARM compile issue
* Fast forward instead of rebase existing git repo
* Fixed ctapdriver initialization issue
* Reset read-only status when opening an image file
* Cleanup
* Cleanup
* Made logging more consistent
* Updated log level
* Cleanup
* Log load/eject on error level for testing
* Revert "Log load/eject on error level for testing"
This reverts commit d35a15ea8e520517d25e1e1054ad1aeda9f85f2e.
* Assume drive is not ready after having been stopped
* Updated status handling
* Make the csv config files store all relevant device data for reading
* Read 9 column csv config files
* Fixed typo
* Rebuild manpage
* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)
* Removed unused code
* Enum data type update
* Removed duplicate range check
* Removed duplicate code
* Removed more duplicate code
* Logging update
* SCCD sector size was not meant to be configurable
* Better error handling for csv reading and writing
* Updated configurable sector size properties
* Removed assertion
* Improved error handling
* Updated error handling
* Re-added special error handling only relevant for SASI
* Added TODOs
* Comment update
* Added override modifier
* Removed obsolete debug flag (related code was not called)
* Comment and logging updates
* Removed obsolete try/catch
* Revert "Removed obsolete try/catch"
This reverts commit 39ca12d8b153c706316ce79f4fec65c9abc60024.
* Comment update
* Removed duplicate code
* Updated error messages, use more foreach loops
* Avoid storing RaSCSI generated product info in config file
* Updated logging
* Logging update
* Save config files in json instead of csv
* Fix bugs with json config loading
* Refactoring & remove unused code
* Refactoring
* Display upper case file endings in file management list
* Only show product vendor for non-RaSCSI devices in the device list
* Translate code comment
* Refactoring
* Fix bad identation
* Improve valid file extension handling
* Add validation when attaching removable media
* Display valid file endings under the file list
* Cleanup
* Don't store 0 block size
* Fix indentation
* Read and write config files in key:pair format
* Add section for controlling logging
* README update
* Added block_count
* Cleanup, fix typos
* Support attaching CD-ROM with custom block size
* Evaluate block size when inserting a media
* rasctl display capacity if available
* Info message update
* Use kwargs for device attachment
* Fix bugs in attach_image kwargs; make config file more readable
* POC for attaching device with profile
* Only list product types valid for the particular image file
* Perform validation of HDD image size based on the product profile
* Implement sidecar config files for drive images.
* Added missing product name to NEC vital product data
* MO block size depends on capacity only
* Better error handling for device sidecar config loading
* Extended property/status display
* Property display update
* Updated error handling
* Handle image sizes in bytes internally
* Revert change
* Resolve bad merge
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-15 02:51:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# Stops the rascsi-web and apache2 processes
|
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf
* Formatted the Status column, and fixed the available ID logic
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Better handling of device status
* Updated parameter handling
* Updated setting default interfaces
* Revert "Updated setting default interfaces"
This reverts commit 210abc775d9a79dd0c631cf3877966a2923f4d5b.
* Revert "Updated parameter handling"
This reverts commit 35302addd59f5f5e1cc032888ba32dcbb426a846.
* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).
* Move id reservation back into __main__
* Remove check for device type when validating Removed image
* Leverage device property data for better status messages
* Remove redundant string sanitation when reading config csv file
* Clean up device list generation
* Cleanup
* Remove duplicates before building valid scsi id list
* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp
* rascsi supports reserving IDs
* Updated help message
* Replaced BOOL by bool
* Logging update
* Logging update
* Cleanup
* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself
* Remove redundant steps handled in Makefile
* Add the functionality to specify connect_type through a parameter
* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options
* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp
* Cleanup
* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter
* Improve on the network setup messages
* Fix routing address
* Add checks for previous configuration; cleanup
* Cleanup
* Remove redundant step in wired setup. Improve messages.
* Cleanup
* Added default parameters to device properties
* Return parameters a device was set up with
* Add flows for configuring custom network settings; adopting some logic by sonique6784
* Improved device initialization
* Updated default parameter handling
* Updated default parameter handling
* Fixed typo
* Comment updates
* Comment update
* Make iso generation work again, and add error handling to urllib actions
* Manage default parameters in the respective device
* Print available network interfaces. Clean up step and improve descriptive messages.
* Make the script clean up previous configurations
* Make the script only show relevant interfaces
* Partial translation of cfilesystem.cpp
* Do not pass empty parameter string
* Added supports_params flag
* Completely translate code comments in cfilesystem.cpp
* Show rascsi-web status after installing
* Refactoring
* Made comparisons more consistent
* Updated error handling
* Updated exception handling
* Made comparisons more consistent
* Updated error handling
* Overlooked code comment translation
* Renaming
* Better error handling for socket connection
* Disable two NEC hd image types due to issue#232
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Better handling of removable disks in the web ui
* Added stoppable property and stopped status
* Made MO stoppable
* Removed duplicate code
* Removed duplicate code
* Copy read-only property
* Renaming
* Add an assistant for reserving scsi ids
* Don't show action if no device attached
* Implement a device_info app path, and cut down on device columns always shown
* Cleanup
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Made disk_t private
* Made some data structures private
* Fixed ARM compile issue
* Fast forward instead of rebase existing git repo
* Fixed ctapdriver initialization issue
* Reset read-only status when opening an image file
* Cleanup
* Cleanup
* Made logging more consistent
* Updated log level
* Cleanup
* Log load/eject on error level for testing
* Revert "Log load/eject on error level for testing"
This reverts commit d35a15ea8e520517d25e1e1054ad1aeda9f85f2e.
* Assume drive is not ready after having been stopped
* Updated status handling
* Make the csv config files store all relevant device data for reading
* Read 9 column csv config files
* Fixed typo
* Rebuild manpage
* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)
* Removed unused code
* Enum data type update
* Removed duplicate range check
* Removed duplicate code
* Removed more duplicate code
* Logging update
* SCCD sector size was not meant to be configurable
* Better error handling for csv reading and writing
* Updated configurable sector size properties
* Removed assertion
* Improved error handling
* Updated error handling
* Re-added special error handling only relevant for SASI
* Added TODOs
* Comment update
* Added override modifier
* Removed obsolete debug flag (related code was not called)
* Comment and logging updates
* Removed obsolete try/catch
* Revert "Removed obsolete try/catch"
This reverts commit 39ca12d8b153c706316ce79f4fec65c9abc60024.
* Comment update
* Removed duplicate code
* Updated error messages, use more foreach loops
* Avoid storing RaSCSI generated product info in config file
* Updated logging
* Logging update
* Save config files in json instead of csv
* Fix bugs with json config loading
* Refactoring & remove unused code
* Refactoring
* Display upper case file endings in file management list
* Only show product vendor for non-RaSCSI devices in the device list
* Translate code comment
* Refactoring
* Fix bad identation
* Improve valid file extension handling
* Add validation when attaching removable media
* Display valid file endings under the file list
* Cleanup
* Don't store 0 block size
* Fix indentation
* Read and write config files in key:pair format
* Add section for controlling logging
* README update
* Added block_count
* Cleanup, fix typos
* Support attaching CD-ROM with custom block size
* Evaluate block size when inserting a media
* rasctl display capacity if available
* Info message update
* Use kwargs for device attachment
* Fix bugs in attach_image kwargs; make config file more readable
* POC for attaching device with profile
* Only list product types valid for the particular image file
* Perform validation of HDD image size based on the product profile
* Implement sidecar config files for drive images.
* Added missing product name to NEC vital product data
* MO block size depends on capacity only
* Better error handling for device sidecar config loading
* Extended property/status display
* Property display update
* Updated error handling
* Handle image sizes in bytes internally
* Revert change
* Resolve bad merge
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-15 02:51:12 +00:00
|
|
|
|
function stopOldWebInterface() {
|
2021-10-21 05:06:00 +00:00
|
|
|
|
stopRaScsiWeb
|
|
|
|
|
|
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf
* Formatted the Status column, and fixed the available ID logic
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Better handling of device status
* Updated parameter handling
* Updated setting default interfaces
* Revert "Updated setting default interfaces"
This reverts commit 210abc775d9a79dd0c631cf3877966a2923f4d5b.
* Revert "Updated parameter handling"
This reverts commit 35302addd59f5f5e1cc032888ba32dcbb426a846.
* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).
* Move id reservation back into __main__
* Remove check for device type when validating Removed image
* Leverage device property data for better status messages
* Remove redundant string sanitation when reading config csv file
* Clean up device list generation
* Cleanup
* Remove duplicates before building valid scsi id list
* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp
* rascsi supports reserving IDs
* Updated help message
* Replaced BOOL by bool
* Logging update
* Logging update
* Cleanup
* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself
* Remove redundant steps handled in Makefile
* Add the functionality to specify connect_type through a parameter
* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options
* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp
* Cleanup
* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter
* Improve on the network setup messages
* Fix routing address
* Add checks for previous configuration; cleanup
* Cleanup
* Remove redundant step in wired setup. Improve messages.
* Cleanup
* Added default parameters to device properties
* Return parameters a device was set up with
* Add flows for configuring custom network settings; adopting some logic by sonique6784
* Improved device initialization
* Updated default parameter handling
* Updated default parameter handling
* Fixed typo
* Comment updates
* Comment update
* Make iso generation work again, and add error handling to urllib actions
* Manage default parameters in the respective device
* Print available network interfaces. Clean up step and improve descriptive messages.
* Make the script clean up previous configurations
* Make the script only show relevant interfaces
* Partial translation of cfilesystem.cpp
* Do not pass empty parameter string
* Added supports_params flag
* Completely translate code comments in cfilesystem.cpp
* Show rascsi-web status after installing
* Refactoring
* Made comparisons more consistent
* Updated error handling
* Updated exception handling
* Made comparisons more consistent
* Updated error handling
* Overlooked code comment translation
* Renaming
* Better error handling for socket connection
* Disable two NEC hd image types due to issue#232
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Better handling of removable disks in the web ui
* Added stoppable property and stopped status
* Made MO stoppable
* Removed duplicate code
* Removed duplicate code
* Copy read-only property
* Renaming
* Add an assistant for reserving scsi ids
* Don't show action if no device attached
* Implement a device_info app path, and cut down on device columns always shown
* Cleanup
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Made disk_t private
* Made some data structures private
* Fixed ARM compile issue
* Fast forward instead of rebase existing git repo
* Fixed ctapdriver initialization issue
* Reset read-only status when opening an image file
* Cleanup
* Cleanup
* Made logging more consistent
* Updated log level
* Cleanup
* Log load/eject on error level for testing
* Revert "Log load/eject on error level for testing"
This reverts commit d35a15ea8e520517d25e1e1054ad1aeda9f85f2e.
* Assume drive is not ready after having been stopped
* Updated status handling
* Make the csv config files store all relevant device data for reading
* Read 9 column csv config files
* Fixed typo
* Rebuild manpage
* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)
* Removed unused code
* Enum data type update
* Removed duplicate range check
* Removed duplicate code
* Removed more duplicate code
* Logging update
* SCCD sector size was not meant to be configurable
* Better error handling for csv reading and writing
* Updated configurable sector size properties
* Removed assertion
* Improved error handling
* Updated error handling
* Re-added special error handling only relevant for SASI
* Added TODOs
* Comment update
* Added override modifier
* Removed obsolete debug flag (related code was not called)
* Comment and logging updates
* Removed obsolete try/catch
* Revert "Removed obsolete try/catch"
This reverts commit 39ca12d8b153c706316ce79f4fec65c9abc60024.
* Comment update
* Removed duplicate code
* Updated error messages, use more foreach loops
* Avoid storing RaSCSI generated product info in config file
* Updated logging
* Logging update
* Save config files in json instead of csv
* Fix bugs with json config loading
* Refactoring & remove unused code
* Refactoring
* Display upper case file endings in file management list
* Only show product vendor for non-RaSCSI devices in the device list
* Translate code comment
* Refactoring
* Fix bad identation
* Improve valid file extension handling
* Add validation when attaching removable media
* Display valid file endings under the file list
* Cleanup
* Don't store 0 block size
* Fix indentation
* Read and write config files in key:pair format
* Add section for controlling logging
* README update
* Added block_count
* Cleanup, fix typos
* Support attaching CD-ROM with custom block size
* Evaluate block size when inserting a media
* rasctl display capacity if available
* Info message update
* Use kwargs for device attachment
* Fix bugs in attach_image kwargs; make config file more readable
* POC for attaching device with profile
* Only list product types valid for the particular image file
* Perform validation of HDD image size based on the product profile
* Implement sidecar config files for drive images.
* Added missing product name to NEC vital product data
* MO block size depends on capacity only
* Better error handling for device sidecar config loading
* Extended property/status display
* Property display update
* Updated error handling
* Handle image sizes in bytes internally
* Revert change
* Resolve bad merge
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-15 02:51:12 +00:00
|
|
|
|
APACHE_STATUS=$(sudo systemctl status apache2 &> /dev/null; echo $?)
|
|
|
|
|
if [ "$APACHE_STATUS" -eq 0 ] ; then
|
|
|
|
|
echo "Stopping old Apache2 RaSCSI Web..."
|
|
|
|
|
sudo systemctl disable apache2
|
|
|
|
|
sudo systemctl stop apache2
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# Checks for upstream changes to the git repo and fast-forwards changes if needed
|
2020-12-31 01:39:32 +00:00
|
|
|
|
function updateRaScsiGit() {
|
2021-10-14 01:01:13 +00:00
|
|
|
|
cd "$BASE" || exit 1
|
2021-12-23 17:08:50 +00:00
|
|
|
|
|
|
|
|
|
set +e
|
|
|
|
|
git rev-parse --is-inside-work-tree &> /dev/null
|
|
|
|
|
if [[ $? -ge 1 ]]; then
|
|
|
|
|
echo "Warning: This does not seem to be a valid clone of a git repository. I will not be able to pull the latest code."
|
|
|
|
|
return 0
|
|
|
|
|
fi
|
|
|
|
|
set -e
|
|
|
|
|
|
2021-07-31 15:52:09 +00:00
|
|
|
|
stashed=0
|
|
|
|
|
if [[ $(git diff --stat) != '' ]]; then
|
2021-10-14 01:01:13 +00:00
|
|
|
|
echo "There are local changes to the RaSCSI code; we will stash and reapply them."
|
|
|
|
|
git -c user.name="${GIT_COMMITTER_NAME-rascsi}" -c user.email="${GIT_COMMITTER_EMAIL-rascsi@rascsi.com}" stash
|
2021-07-31 15:52:09 +00:00
|
|
|
|
stashed=1
|
|
|
|
|
fi
|
|
|
|
|
|
2021-10-14 01:01:13 +00:00
|
|
|
|
if [[ `git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"` != "" ]]; then
|
|
|
|
|
echo "Updating checked out git branch $GIT_REMOTE/$GIT_BRANCH"
|
|
|
|
|
git pull --ff-only
|
|
|
|
|
else
|
|
|
|
|
echo "Detected a local git working branch; skipping the remote update step."
|
|
|
|
|
fi
|
2021-07-31 15:52:09 +00:00
|
|
|
|
|
|
|
|
|
if [ $stashed -eq 1 ]; then
|
|
|
|
|
echo "Reapplying local changes..."
|
|
|
|
|
git stash apply
|
|
|
|
|
fi
|
2020-12-31 01:39:32 +00:00
|
|
|
|
}
|
2020-10-25 23:55:53 +00:00
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# Takes a backup copy of the rascsi.service file if it exists
|
|
|
|
|
function backupRaScsiService() {
|
2021-12-03 01:18:45 +00:00
|
|
|
|
if [ -f "$SYSTEMD_PATH/rascsi.service" ]; then
|
|
|
|
|
sudo mv "$SYSTEMD_PATH/rascsi.service" "$SYSTEMD_PATH/rascsi.service.old"
|
2021-11-19 02:17:24 +00:00
|
|
|
|
SYSTEMD_BACKUP=true
|
|
|
|
|
echo "Existing version of rascsi.service detected; Backing up to rascsi.service.old"
|
|
|
|
|
else
|
|
|
|
|
SYSTEMD_BACKUP=false
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-22 02:49:53 +00:00
|
|
|
|
# Offers the choice of enabling token-based authentication for RaSCSI, or disables it if enabled
|
2022-01-01 17:38:10 +00:00
|
|
|
|
function configureTokenAuth() {
|
2022-08-28 13:51:31 +00:00
|
|
|
|
if [[ -f "$HOME/.rascsi_secret" ]]; then
|
|
|
|
|
sudo rm "$HOME/.rascsi_secret"
|
|
|
|
|
echo "Removed (legacy) RaSCSI token file"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ -f $SECRET_FILE ]]; then
|
|
|
|
|
sudo rm "$SECRET_FILE"
|
2022-10-22 02:49:53 +00:00
|
|
|
|
echo "RaSCSI token file $SECRET_FILE already exists. Do you want to disable authentication? (y/N)"
|
2022-08-28 13:51:31 +00:00
|
|
|
|
read REPLY
|
2021-12-23 17:12:16 +00:00
|
|
|
|
|
2022-10-22 02:49:53 +00:00
|
|
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
|
|
|
sudo sed -i 's@-P '"$SECRET_FILE"'@@' "$SYSTEMD_PATH/rascsi.service"
|
|
|
|
|
return
|
2022-08-28 13:51:31 +00:00
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
2022-10-22 02:49:53 +00:00
|
|
|
|
echo -n "Enter the token password for protecting RaSCSI: "
|
|
|
|
|
read -r TOKEN
|
|
|
|
|
|
2022-08-28 13:51:31 +00:00
|
|
|
|
echo "$TOKEN" > "$SECRET_FILE"
|
2022-07-29 05:48:18 +00:00
|
|
|
|
|
|
|
|
|
# Make the secret file owned and only readable by root
|
2022-08-28 13:51:31 +00:00
|
|
|
|
sudo chown root:root "$SECRET_FILE"
|
|
|
|
|
sudo chmod 600 "$SECRET_FILE"
|
2022-10-22 02:49:53 +00:00
|
|
|
|
|
|
|
|
|
sudo sed -i "s@^ExecStart.*@& -P $SECRET_FILE@" "$SYSTEMD_PATH/rascsi.service"
|
|
|
|
|
|
2022-08-28 13:51:31 +00:00
|
|
|
|
echo ""
|
|
|
|
|
echo "Configured RaSCSI to use $SECRET_FILE for authentication. This file is readable by root only."
|
|
|
|
|
echo "Make note of your password: you will need it to use rasctl and other RaSCSI clients."
|
2022-10-22 02:49:53 +00:00
|
|
|
|
echo "If you have RaSCSI clients installed, please re-run the installation scripts, or update the systemd config manually."
|
2022-01-01 17:38:10 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-22 02:49:53 +00:00
|
|
|
|
# Enables and starts the rascsi service
|
2022-01-01 17:38:10 +00:00
|
|
|
|
function enableRaScsiService() {
|
2021-11-19 02:17:24 +00:00
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
|
sudo systemctl restart rsyslog
|
|
|
|
|
sudo systemctl enable rascsi # optional - start rascsi at boot
|
|
|
|
|
sudo systemctl start rascsi
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Modifies and installs the rascsi-web service
|
|
|
|
|
function installWebInterfaceService() {
|
2022-10-22 02:49:53 +00:00
|
|
|
|
if [[ -f "$SECRET_FILE" && -z "$TOKEN" ]] ; then
|
|
|
|
|
echo ""
|
|
|
|
|
echo "Secret token file $SECRET_FILE detected. You must enter the password, or press Ctrl+C to cancel installation."
|
|
|
|
|
read -r TOKEN
|
|
|
|
|
fi
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
echo "Installing the rascsi-web.service configuration..."
|
2022-01-09 14:26:28 +00:00
|
|
|
|
sudo cp -f "$WEB_INSTALL_PATH/service-infra/rascsi-web.service" "$SYSTEMD_PATH/rascsi-web.service"
|
2021-12-03 01:18:45 +00:00
|
|
|
|
sudo sed -i /^ExecStart=/d "$SYSTEMD_PATH/rascsi-web.service"
|
2022-10-22 02:49:53 +00:00
|
|
|
|
|
2021-12-23 17:12:16 +00:00
|
|
|
|
if [ ! -z "$TOKEN" ]; then
|
|
|
|
|
sudo sed -i "8 i ExecStart=$WEB_INSTALL_PATH/start.sh --password=$TOKEN" "$SYSTEMD_PATH/rascsi-web.service"
|
2022-07-29 05:48:18 +00:00
|
|
|
|
# Make the service file readable by root only, to protect the token string
|
2021-12-23 17:12:16 +00:00
|
|
|
|
sudo chmod 600 "$SYSTEMD_PATH/rascsi-web.service"
|
2022-01-01 17:38:10 +00:00
|
|
|
|
echo "Granted access to the Web Interface with the token password that you configured for RaSCSI."
|
2021-12-23 17:12:16 +00:00
|
|
|
|
else
|
|
|
|
|
sudo sed -i "8 i ExecStart=$WEB_INSTALL_PATH/start.sh" "$SYSTEMD_PATH/rascsi-web.service"
|
|
|
|
|
fi
|
2021-11-19 02:17:24 +00:00
|
|
|
|
|
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
|
sudo systemctl enable rascsi-web
|
|
|
|
|
sudo systemctl start rascsi-web
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Stops the rascsi service if it is running
|
2021-10-21 05:06:00 +00:00
|
|
|
|
function stopRaScsi() {
|
2022-01-09 14:26:28 +00:00
|
|
|
|
if [[ -f "$SYSTEMD_PATH/rascsi.service" ]]; then
|
|
|
|
|
SERVICE_RASCSI_RUNNING=0
|
|
|
|
|
sudo systemctl is-active --quiet rascsi.service >/dev/null 2>&1 || SERVICE_RASCSI_RUNNING=$?
|
|
|
|
|
if [[ $SERVICE_RASCSI_RUNNING -eq 0 ]]; then
|
|
|
|
|
sudo systemctl stop rascsi.service
|
|
|
|
|
fi
|
2021-10-21 05:06:00 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# Stops the rascsi-web service if it is running
|
2021-10-21 05:06:00 +00:00
|
|
|
|
function stopRaScsiWeb() {
|
2022-01-09 14:26:28 +00:00
|
|
|
|
if [[ -f "$SYSTEMD_PATH/rascsi-web.service" ]]; then
|
|
|
|
|
SERVICE_RASCSI_WEB_RUNNING=0
|
|
|
|
|
sudo systemctl is-active --quiet rascsi-web.service >/dev/null 2>&1 || SERVICE_RASCSI_WEB_RUNNING=$?
|
|
|
|
|
if [[ $SERVICE_RASCSI_WEB_RUNNING -eq 0 ]]; then
|
|
|
|
|
sudo systemctl stop rascsi-web.service
|
|
|
|
|
fi
|
2021-10-21 05:06:00 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-09 14:26:28 +00:00
|
|
|
|
# Stops the rascsi-oled service if it is running
|
2021-10-21 05:06:00 +00:00
|
|
|
|
function stopRaScsiScreen() {
|
2022-01-09 14:26:28 +00:00
|
|
|
|
if [[ -f "$SYSTEMD_PATH/monitor_rascsi.service" ]]; then
|
|
|
|
|
SERVICE_MONITOR_RASCSI_RUNNING=0
|
|
|
|
|
sudo systemctl is-active --quiet monitor_rascsi.service >/dev/null 2>&1 || SERVICE_MONITOR_RASCSI_RUNNING=$?
|
|
|
|
|
if [[ $SERVICE_MONITOR_RASCSI_RUNNING -eq 0 ]]; then
|
|
|
|
|
sudo systemctl stop monitor_rascsi.service
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
if [[ -f "$SYSTEMD_PATH/rascsi-oled.service" ]]; then
|
|
|
|
|
SERVICE_RASCSI_OLED_RUNNING=0
|
|
|
|
|
sudo systemctl is-active --quiet rascsi-oled.service >/dev/null 2>&1 || SERVICE_RASCSI_OLED_RUNNING=$?
|
|
|
|
|
if [[ $SERVICE_RASCSI_OLED_RUNNING -eq 0 ]]; then
|
|
|
|
|
sudo systemctl stop rascsi-oled.service
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-25 20:03:36 +00:00
|
|
|
|
# Stops the rascsi-ctrlboard service if it is running
|
|
|
|
|
function stopRaScsiCtrlBoard() {
|
|
|
|
|
if [[ -f "$SYSTEMD_PATH/rascsi-ctrlboard.service" ]]; then
|
|
|
|
|
SERVICE_RASCSI_CTRLBOARD_RUNNING=0
|
|
|
|
|
sudo systemctl is-active --quiet rascsi-ctrlboard.service >/dev/null 2>&1 || SERVICE_RASCSI_CTRLBOARD_RUNNING=$?
|
|
|
|
|
if [[ SERVICE_RASCSI_CTRLBOARD_RUNNING -eq 0 ]]; then
|
|
|
|
|
sudo systemctl stop rascsi-ctrlboard.service
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-09 14:26:28 +00:00
|
|
|
|
# disables and removes the old monitor_rascsi service
|
|
|
|
|
function disableOldRaScsiMonitorService() {
|
2021-12-03 01:18:45 +00:00
|
|
|
|
if [ -f "$SYSTEMD_PATH/monitor_rascsi.service" ]; then
|
2022-01-09 14:26:28 +00:00
|
|
|
|
SERVICE_MONITOR_RASCSI_RUNNING=0
|
|
|
|
|
sudo systemctl is-active --quiet monitor_rascsi.service >/dev/null 2>&1 || SERVICE_MONITOR_RASCSI_RUNNING=$?
|
|
|
|
|
if [[ $SERVICE_MONITOR_RASCSI_RUNNING -eq 0 ]]; then
|
|
|
|
|
sudo systemctl stop monitor_rascsi.service
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
SERVICE_MONITOR_RASCSI_ENABLED=0
|
|
|
|
|
sudo systemctl is-enabled --quiet monitor_rascsi.service >/dev/null 2>&1 || SERVICE_MONITOR_RASCSI_ENABLED=$?
|
|
|
|
|
if [[ $SERVICE_MONITOR_RASCSI_ENABLED -eq 0 ]]; then
|
|
|
|
|
sudo systemctl disable monitor_rascsi.service
|
|
|
|
|
fi
|
|
|
|
|
sudo rm $SYSTEMD_PATH/monitor_rascsi.service
|
2021-10-21 05:06:00 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-25 20:03:36 +00:00
|
|
|
|
# disables the rascsi-oled service
|
|
|
|
|
function disableRaScsiOledService() {
|
|
|
|
|
if [ -f "$SYSTEMD_PATH/rascsi-oled.service" ]; then
|
|
|
|
|
SERVICE_RASCSI_OLED_RUNNING=0
|
|
|
|
|
sudo systemctl is-active --quiet rascsi-oled.service >/dev/null 2>&1 || SERVICE_RASCSI_OLED_RUNNING=$?
|
|
|
|
|
if [[ $SERVICE_RASCSI_OLED_RUNNING -eq 0 ]]; then
|
|
|
|
|
sudo systemctl stop rascsi-oled.service
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
SERVICE_RASCSI_OLED_ENABLED=0
|
|
|
|
|
sudo systemctl is-enabled --quiet rascsi-oled.service >/dev/null 2>&1 || SERVICE_RASCSI_OLED_ENABLED=$?
|
|
|
|
|
if [[ $SERVICE_RASCSI_OLED_ENABLED -eq 0 ]]; then
|
|
|
|
|
sudo systemctl disable rascsi-oled.service
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# disables the rascsi-ctrlboard service
|
|
|
|
|
function disableRaScsiCtrlBoardService() {
|
|
|
|
|
if [ -f "$SYSTEMD_PATH/rascsi-ctrlboard.service" ]; then
|
|
|
|
|
SERVICE_RASCSI_CTRLBOARD_RUNNING=0
|
|
|
|
|
sudo systemctl is-active --quiet rascsi-ctrlboard.service >/dev/null 2>&1 || SERVICE_RASCSI_CTRLBOARD_RUNNING=$?
|
|
|
|
|
if [[ $SERVICE_RASCSI_CTRLBOARD_RUNNING -eq 0 ]]; then
|
|
|
|
|
sudo systemctl stop rascsi-ctrlboard.service
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
SERVICE_RASCSI_CTRLBOARD_ENABLED=0
|
|
|
|
|
sudo systemctl is-enabled --quiet rascsi-ctrlboard.service >/dev/null 2>&1 || SERVICE_RASCSI_CTRLBOARD_ENABLED=$?
|
|
|
|
|
if [[ $SERVICE_RASCSI_CTRLBOARD_ENABLED -eq 0 ]]; then
|
|
|
|
|
sudo systemctl disable rascsi-ctrlboard.service
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-07 02:41:46 +00:00
|
|
|
|
# Stops the macproxy service if it is running
|
|
|
|
|
function stopMacproxy() {
|
|
|
|
|
if [ -f "$SYSTEMD_PATH/macproxy.service" ]; then
|
|
|
|
|
sudo systemctl stop macproxy.service
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-25 20:03:36 +00:00
|
|
|
|
# Checks whether the rascsi-oled service is installed
|
2022-01-09 14:26:28 +00:00
|
|
|
|
function isRaScsiScreenInstalled() {
|
|
|
|
|
SERVICE_RASCSI_OLED_ENABLED=0
|
|
|
|
|
if [[ -f "$SYSTEMD_PATH/rascsi-oled.service" ]]; then
|
|
|
|
|
sudo systemctl is-enabled --quiet rascsi-oled.service >/dev/null 2>&1 || SERVICE_RASCSI_OLED_ENABLED=$?
|
|
|
|
|
elif [[ -f "$SYSTEMD_PATH/monitor_rascsi.service" ]]; then
|
|
|
|
|
sudo systemctl is-enabled --quiet monitor_rascsi.service >/dev/null 2>&1 || SERVICE_RASCSI_OLED_ENABLED=$?
|
2022-01-17 05:11:21 +00:00
|
|
|
|
else
|
|
|
|
|
SERVICE_RASCSI_OLED_ENABLED=1
|
2022-01-09 14:26:28 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo $SERVICE_RASCSI_OLED_ENABLED
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-25 20:03:36 +00:00
|
|
|
|
# Checks whether the rascsi-ctrlboard service is installed
|
|
|
|
|
function isRaScsiCtrlBoardInstalled() {
|
|
|
|
|
SERVICE_RASCSI_CTRLBOARD_ENABLED=0
|
|
|
|
|
if [[ -f "$SYSTEMD_PATH/rascsi-ctrlboard.service" ]]; then
|
|
|
|
|
sudo systemctl is-enabled --quiet rascsi-ctrlboard.service >/dev/null 2>&1 || SERVICE_RASCSI_CTRLBOARD_ENABLED=$?
|
|
|
|
|
else
|
|
|
|
|
SERVICE_RASCSI_CTRLBOARD_ENABLED=1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo $SERVICE_RASCSI_CTRLBOARD_ENABLED
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Checks whether the rascsi-oled service is running
|
2022-01-09 14:26:28 +00:00
|
|
|
|
function isRaScsiScreenRunning() {
|
|
|
|
|
SERVICE_RASCSI_OLED_RUNNING=0
|
|
|
|
|
if [[ -f "$SYSTEMD_PATH/rascsi-oled.service" ]]; then
|
|
|
|
|
sudo systemctl is-active --quiet rascsi-oled.service >/dev/null 2>&1 || SERVICE_RASCSI_OLED_RUNNING=$?
|
|
|
|
|
elif [[ -f "$SYSTEMD_PATH/monitor_rascsi.service" ]]; then
|
|
|
|
|
sudo systemctl is-active --quiet monitor_rascsi.service >/dev/null 2>&1 || SERVICE_RASCSI_OLED_RUNNING=$?
|
2022-01-17 05:11:21 +00:00
|
|
|
|
else
|
|
|
|
|
SERVICE_RASCSI_OLED_RUNNING=1
|
2022-01-09 14:26:28 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo $SERVICE_RASCSI_OLED_RUNNING
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-25 20:03:36 +00:00
|
|
|
|
# Checks whether the rascsi-oled service is running
|
|
|
|
|
function isRaScsiCtrlBoardRunning() {
|
|
|
|
|
SERVICE_RASCSI_CTRLBOARD_RUNNING=0
|
|
|
|
|
if [[ -f "$SYSTEMD_PATH/rascsi-ctrlboard.service" ]]; then
|
|
|
|
|
sudo systemctl is-active --quiet rascsi-ctrlboard.service >/dev/null 2>&1 || SERVICE_RASCSI_CTRLBOARD_RUNNING=$?
|
|
|
|
|
else
|
|
|
|
|
SERVICE_RASCSI_CTRLBOARD_RUNNING=1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo $SERVICE_RASCSI_CTRLBOARD_RUNNING
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2022-01-09 14:26:28 +00:00
|
|
|
|
# Starts the rascsi-oled service if installed
|
2021-10-21 05:06:00 +00:00
|
|
|
|
function startRaScsiScreen() {
|
2022-01-09 14:26:28 +00:00
|
|
|
|
if [[ $(isRaScsiScreenInstalled) -eq 0 ]] && [[ $(isRaScsiScreenRunning) -ne 1 ]]; then
|
|
|
|
|
sudo systemctl start rascsi-oled.service
|
2021-11-19 02:17:24 +00:00
|
|
|
|
showRaScsiScreenStatus
|
2021-10-21 05:06:00 +00:00
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-25 20:03:36 +00:00
|
|
|
|
# Starts the rascsi-ctrlboard service if installed
|
|
|
|
|
function startRaScsiCtrlBoard() {
|
|
|
|
|
if [[ $(isRaScsiCtrlBoardInstalled) -eq 0 ]] && [[ $(isRaScsiCtrlBoardRunning) -ne 1 ]]; then
|
|
|
|
|
sudo systemctl start rascsi-ctrlboard.service
|
|
|
|
|
showRaScsiCtrlBoardStatus
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-07 02:41:46 +00:00
|
|
|
|
# Starts the macproxy service if installed
|
|
|
|
|
function startMacproxy() {
|
|
|
|
|
if [ -f "$SYSTEMD_PATH/macproxy.service" ]; then
|
|
|
|
|
sudo systemctl start macproxy.service
|
|
|
|
|
showMacproxyStatus
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# Shows status for the rascsi service
|
2020-10-25 23:55:53 +00:00
|
|
|
|
function showRaScsiStatus() {
|
2021-11-14 19:57:38 +00:00
|
|
|
|
systemctl status rascsi | tee
|
2020-10-25 23:55:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 02:17:24 +00:00
|
|
|
|
# Shows status for the rascsi-web service
|
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf
* Formatted the Status column, and fixed the available ID logic
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Updated handling of removed status for devices without image file support
* Comment update
* Fixed typo
* Updated logging
* Better handling of device status
* Updated parameter handling
* Updated setting default interfaces
* Revert "Updated setting default interfaces"
This reverts commit 210abc775d9a79dd0c631cf3877966a2923f4d5b.
* Revert "Updated parameter handling"
This reverts commit 35302addd59f5f5e1cc032888ba32dcbb426a846.
* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).
* Move id reservation back into __main__
* Remove check for device type when validating Removed image
* Leverage device property data for better status messages
* Remove redundant string sanitation when reading config csv file
* Clean up device list generation
* Cleanup
* Remove duplicates before building valid scsi id list
* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp
* rascsi supports reserving IDs
* Updated help message
* Replaced BOOL by bool
* Logging update
* Logging update
* Cleanup
* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself
* Remove redundant steps handled in Makefile
* Add the functionality to specify connect_type through a parameter
* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options
* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp
* Cleanup
* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter
* Improve on the network setup messages
* Fix routing address
* Add checks for previous configuration; cleanup
* Cleanup
* Remove redundant step in wired setup. Improve messages.
* Cleanup
* Added default parameters to device properties
* Return parameters a device was set up with
* Add flows for configuring custom network settings; adopting some logic by sonique6784
* Improved device initialization
* Updated default parameter handling
* Updated default parameter handling
* Fixed typo
* Comment updates
* Comment update
* Make iso generation work again, and add error handling to urllib actions
* Manage default parameters in the respective device
* Print available network interfaces. Clean up step and improve descriptive messages.
* Make the script clean up previous configurations
* Make the script only show relevant interfaces
* Partial translation of cfilesystem.cpp
* Do not pass empty parameter string
* Added supports_params flag
* Completely translate code comments in cfilesystem.cpp
* Show rascsi-web status after installing
* Refactoring
* Made comparisons more consistent
* Updated error handling
* Updated exception handling
* Made comparisons more consistent
* Updated error handling
* Overlooked code comment translation
* Renaming
* Better error handling for socket connection
* Disable two NEC hd image types due to issue#232
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Comment update
* NEC sectors size must be 512 bytes
* Updated logging
* Updated vendor name handling
* Updated handling of media loading/unloading
* Better handling of removable disks in the web ui
* Added stoppable property and stopped status
* Made MO stoppable
* Removed duplicate code
* Removed duplicate code
* Copy read-only property
* Renaming
* Add an assistant for reserving scsi ids
* Don't show action if no device attached
* Implement a device_info app path, and cut down on device columns always shown
* Cleanup
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Removed duplicate code, added START/STOP
* Improved default parameter handling
* Updated load/eject handling
* Logging update
* Fixed typo
* Verified START/STOP UNIT
* Updated logging
* Updated status handling
* Updated status handling
* More status handling updates
* Logging update
* Made instance fields local variables
* Made disk_t private
* Made some data structures private
* Fixed ARM compile issue
* Fast forward instead of rebase existing git repo
* Fixed ctapdriver initialization issue
* Reset read-only status when opening an image file
* Cleanup
* Cleanup
* Made logging more consistent
* Updated log level
* Cleanup
* Log load/eject on error level for testing
* Revert "Log load/eject on error level for testing"
This reverts commit d35a15ea8e520517d25e1e1054ad1aeda9f85f2e.
* Assume drive is not ready after having been stopped
* Updated status handling
* Make the csv config files store all relevant device data for reading
* Read 9 column csv config files
* Fixed typo
* Rebuild manpage
* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)
* Removed unused code
* Enum data type update
* Removed duplicate range check
* Removed duplicate code
* Removed more duplicate code
* Logging update
* SCCD sector size was not meant to be configurable
* Better error handling for csv reading and writing
* Updated configurable sector size properties
* Removed assertion
* Improved error handling
* Updated error handling
* Re-added special error handling only relevant for SASI
* Added TODOs
* Comment update
* Added override modifier
* Removed obsolete debug flag (related code was not called)
* Comment and logging updates
* Removed obsolete try/catch
* Revert "Removed obsolete try/catch"
This reverts commit 39ca12d8b153c706316ce79f4fec65c9abc60024.
* Comment update
* Removed duplicate code
* Updated error messages, use more foreach loops
* Avoid storing RaSCSI generated product info in config file
* Updated logging
* Logging update
* Save config files in json instead of csv
* Fix bugs with json config loading
* Refactoring & remove unused code
* Refactoring
* Display upper case file endings in file management list
* Only show product vendor for non-RaSCSI devices in the device list
* Translate code comment
* Refactoring
* Fix bad identation
* Improve valid file extension handling
* Add validation when attaching removable media
* Display valid file endings under the file list
* Cleanup
* Don't store 0 |