| # Default-Stop: 0 1 2 3 4 6 |
| # sandbox: Set up / mountpoint to be shared, /var/tmp, /tmp, /home/sandbox unshared |
| # description: sandbox, xguest and other apps that want to use pam_namespace \ |
| # require this script be run at boot. This service script does \ |
| # not actually run any service but sets up: \ |
| # / to be shared by any app that starts a separate namespace |
| # If you do not use sandbox, xguest or pam_namespace you can turn \ |
| # Source function library. |
| LOCKFILE=/var/lock/subsys/sandbox |
| echo -n "Starting sandbox" |
| [ -f "$LOCKFILE" ] && return 0 |
| mount --make-rshared / || return $? |
| echo -n "Stopping sandbox" |
| [ -f "$LOCKFILE" ] || return 1 |
| if [ -f "$LOCKFILE" ]; then |
| start && success || failure |
| start && success || failure |
| stop && success || failure |
| echo $"Usage: $0 {start|stop|status|restart}" |