From 04ee2cf8d6c6054a7d9d95882eb966e0438e9929 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Fri, 24 Sep 2021 12:49:02 -0700 Subject: [PATCH 1/5] Reserve no ids with no inpu --- easyinstall.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/easyinstall.sh b/easyinstall.sh index 8aeea9a9..2de327b6 100755 --- a/easyinstall.sh +++ b/easyinstall.sh @@ -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" From e21f2dd8c1e434724630fef40dcd671e0fd00b9e Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Fri, 24 Sep 2021 12:49:13 -0700 Subject: [PATCH 2/5] Update wording --- src/web/drive_properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/drive_properties.json b/src/web/drive_properties.json index 972a5f9c..9cce3354 100644 --- a/src/web/drive_properties.json +++ b/src/web/drive_properties.json @@ -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": "" }, { From c4287825653c7fe0c083e9431176085ae828ca10 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Fri, 24 Sep 2021 13:01:48 -0700 Subject: [PATCH 3/5] Add more examples to rascsi.service --- src/raspberrypi/os_integration/rascsi.service | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/raspberrypi/os_integration/rascsi.service b/src/raspberrypi/os_integration/rascsi.service index 4a36e0c7..ac03ff4a 100644 --- a/src/raspberrypi/os_integration/rascsi.service +++ b/src/raspberrypi/os_integration/rascsi.service @@ -6,9 +6,15 @@ 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 -i 1 /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 From c440849c7e4dbce3922801b2bcc866e2b601a07c Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Fri, 24 Sep 2021 13:05:21 -0700 Subject: [PATCH 4/5] Fix example --- src/raspberrypi/os_integration/rascsi.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raspberrypi/os_integration/rascsi.service b/src/raspberrypi/os_integration/rascsi.service index ac03ff4a..3a61122b 100644 --- a/src/raspberrypi/os_integration/rascsi.service +++ b/src/raspberrypi/os_integration/rascsi.service @@ -8,7 +8,7 @@ Restart=always ExecStart=/usr/local/bin/rascsi -r 7 # 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 -i 1 /home/pi/images/harddisk.hds +# 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: From 8fbc834fa0ec67fdc5e7d158221e802037acb9b4 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Fri, 24 Sep 2021 13:06:26 -0700 Subject: [PATCH 5/5] Fix example --- src/raspberrypi/os_integration/rascsi.service | 1 + 1 file changed, 1 insertion(+) diff --git a/src/raspberrypi/os_integration/rascsi.service b/src/raspberrypi/os_integration/rascsi.service index 3a61122b..b7251258 100644 --- a/src/raspberrypi/os_integration/rascsi.service +++ b/src/raspberrypi/os_integration/rascsi.service @@ -8,6 +8,7 @@ Restart=always ExecStart=/usr/local/bin/rascsi -r 7 # 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