Skip to content

Commit dd09bca

Browse files
committed
make user param and full paths optional
1 parent 58ca9cb commit dd09bca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

chsh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ if [ "$SHELL2SET" == "" ] ; then
7272
exit 8
7373
fi
7474
if [ "$USER" == "" ] ; then
75-
echo "ERROR!! User not specified." >&2
76-
exit 8
75+
USER="*CURRENT" #effectively making this an option parm, defaulting to *CURRENT
7776
fi
7877

78+
if [[ "$SHELL2SET" != /* ]]; then
79+
SHELL2SET="/QOpenSys/pkgs/bin/$SHELL2SET"
80+
fi
7981
validate_shell "$SHELL2SET"
8082

8183
exec /usr/bin/qsh -c "/usr/bin/db2 \"CALL QSYS2.SET_PASE_SHELL_INFO('$USER', '$SHELL2SET')\" "

0 commit comments

Comments
 (0)