| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # Description: Script to start boinc as a service in DRBL client. |
| 3 | # Author: Steven Shiau <steven _at_ clonezilla org> |
| 4 | # License: GPL |
| 5 | |
| 6 | # Load the setting |
| 7 | . /opt/BOINC/conf/drbl-boinc.confscip-shell source . . `/opt/BOINC/conf/drbl-boinc.conf`. |
| 8 | |
| 9 | # |
| 10 | export PATH=$PATH:$BOINC_DIR |
| 11 | |
| 12 | if ! mountscip-shell system . . mount. -t tmpfs -o size="$RAMDISK_SIZE" none $workzone; then |
| 13 | echoscip-shell system . . echo. "Unable to mount tmpfs working zone! Abort!" |
| 14 | exit 1 |
| 15 | fi |
| 16 | |
| 17 | echoscip-shell system . . echo. "Running BOINC..." |
| 18 | suscip-shell system . . su. -c "/opt/BOINC/run-as-userscip-shell filesystem . . `/opt/BOINC/run-as-user`." -l $USERNAME |