mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-25 03:32:16 +00:00
Merge branch 'feature_backend_reserve' into fix_uploads
This commit is contained in:
commit
653165afa5
@ -401,10 +401,16 @@ function reserveScsiIds() {
|
||||
echo "WARNING: This will override any existing modifications to rascsi.service!"
|
||||
echo "Please type the SCSI ID(s) that you want to reserve and press Enter:"
|
||||
echo "The input should be numbers between 0 and 7 separated by commas, e.g. \"0,1,7\" for IDs 0, 1, and 7."
|
||||
echo "Leave empty to make all IDs available."
|
||||
read -r RESERVED_IDS
|
||||
|
||||
sudo sed -i /^ExecStart=/d /etc/systemd/system/rascsi.service
|
||||
sudo sed -i "8 i ExecStart=/usr/local/bin/rascsi -r $RESERVED_IDS" /etc/systemd/system/rascsi.service
|
||||
if [[ $RESERVED_IDS = "" ]]; then
|
||||
sudo sed -i /^ExecStart=/d /etc/systemd/system/rascsi.service
|
||||
sudo sed -i "8 i ExecStart=/usr/local/bin/rascsi" /etc/systemd/system/rascsi.service
|
||||
else
|
||||
sudo sed -i /^ExecStart=/d /etc/systemd/system/rascsi.service
|
||||
sudo sed -i "8 i ExecStart=/usr/local/bin/rascsi -r $RESERVED_IDS" /etc/systemd/system/rascsi.service
|
||||
fi
|
||||
|
||||
echo "Modified /etc/systemd/system/rascsi.service"
|
||||
|
||||
|
@ -6,9 +6,16 @@ After=network.target
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/usr/local/bin/rascsi -r 7
|
||||
# Example: If you want to automatically attach a hard disk at startup, change
|
||||
# the ExecStart line to:
|
||||
# ExecStart=/usr/local/bin/rascsi -ID1 /home/pi/images/harddisk.hda
|
||||
# Example 1: If you want to automatically attach a hard disk at startup,
|
||||
# say an image called harddisk.hds on SCSI ID 1, change the ExecStart line to:
|
||||
#
|
||||
# ExecStart=/usr/local/bin/rascsi -ID1 /home/pi/images/harddisk.hds
|
||||
#
|
||||
# Example 2: If you want to reserve SCSI IDs to prevent usage, add '-r' followed by
|
||||
# comma-separated SCSI ID numbers; for instance IDs 0 and 7:
|
||||
#
|
||||
# ExecStart=/usr/local/bin/rascsi -r 0,7
|
||||
#
|
||||
# This functionality isn't implmented yet: ExecStop=/usr/local/bin/rasctl -stop
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
|
@ -200,7 +200,7 @@
|
||||
"size": 2147357696,
|
||||
"name": "Seagate Barracuda 2GB",
|
||||
"file_type": "hds",
|
||||
"description": "2GB is the largest volume size of HFS on older Macs.",
|
||||
"description": "2GB is the largest partition size of HFS on older Macs.",
|
||||
"url": ""
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user