View | Details | Raw Unified | Return to bug 9103
Collapse All | Expand All

(-)hsh-run.fix (-2 / +7 lines)
Lines 50-55 Options: Link Here
50
  --rooter                  run program as pseudoroot;
50
  --rooter                  run program as pseudoroot;
51
  --save-fakeroot           save fakeroot state;
51
  --save-fakeroot           save fakeroot state;
52
  --shell                   run interactive shell;
52
  --shell                   run interactive shell;
53
  --shell-prog=SHELL        use SHELL as shell.
53
  --x11-timeout=SECONDS     how long X11 authorization will be valid;
54
  --x11-timeout=SECONDS     how long X11 authorization will be valid;
54
  -x                        disable X11 forwarding;
55
  -x                        disable X11 forwarding;
55
  -X                        enable X11 forwarding;
56
  -X                        enable X11 forwarding;
Lines 65-77 EOF Link Here
65
	exit
66
	exit
66
}
67
}
67
68
68
TEMP=`getopt -n $PROG -o x,X,Y,h,q,v,V -l builder,execute:,hasher-priv-dir:,mountpoints:,number:,pty,rooter,save-fakeroot,shell,x11-timeout:,help,quiet,verbose,version -- "$@"` ||
69
TEMP=`getopt -n $PROG -o x,X,Y,h,q,v,V -l builder,execute:,hasher-priv-dir:,mountpoints:,number:,pty,rooter,save-fakeroot,shell,x11-timeout:,help,quiet,verbose,version,shell-prog: -- "$@"` ||
69
	show_usage
70
	show_usage
70
eval set -- "$TEMP"
71
eval set -- "$TEMP"
71
72
72
run_as_rooter=
73
run_as_rooter=
73
run_script=
74
run_script=
74
run_shell=
75
run_shell=
76
shell_prog="bash"
75
77
76
if [ "${0##*/}" = hsh-shell ]; then
78
if [ "${0##*/}" = hsh-shell ]; then
77
	run_shell=1
79
	run_shell=1
Lines 105-110 while :; do Link Here
105
			;;
107
			;;
106
		--shell) run_shell=1; use_pty=yes; export use_pty
108
		--shell) run_shell=1; use_pty=yes; export use_pty
107
			;;
109
			;;
110
		--shell-prog) shift; 
111
			[ -z "$1" ] || shell_prog="$1"
112
			;;
108
		--x11-timeout) shift; x11_timeout="$1"
113
		--x11-timeout) shift; x11_timeout="$1"
109
			;;
114
			;;
110
		-x) x11_forwarding=
115
		-x) x11_forwarding=
Lines 133-139 fi Link Here
133
138
134
if [ -n "$run_shell" ]; then
139
if [ -n "$run_shell" ]; then
135
	[ "$#" -eq 0 ] || show_usage 'Too many arguments.'
140
	[ "$#" -eq 0 ] || show_usage 'Too many arguments.'
136
	set -- -a -bash bash
141
	set -- -a -"$shell_prog" "$shell_prog"
137
fi
142
fi
138
143
139
# Either --execute or one more argument, please.
144
# Either --execute or one more argument, please.

Return to bug 9103