Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1057625 - add-user.sh syntax cygwin fix (for EAP 6.3.0)
add-user.sh syntax cygwin fix (for EAP 6.3.0)
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Scripts and Commands (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity unspecified
: DR0
: EAP 6.3.0
Assigned To: Permaine Cheung
Petr Kremensky
Russell Dickenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-24 08:48 EST by Permaine Cheung
Modified: 2014-07-08 20:13 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, it was found that the `add-user.sh` script would fail when run in Cygwin environments. The cause was identified as a poorly formatted line of code in the script. This issue has been resolved in this release, however the script still carries an unresolved issue when run in Cygwin environments. Refer to ticket 1069252 in the Known Issues section of this document for more information.
Story Points: ---
Clone Of: 1056130
Environment:
Last Closed: 2014-06-28 11:27:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Permaine Cheung 2014-01-24 08:48:27 EST
add-user.sh fails under cygwin for bad syntax. It's a trivial one line change like WFLY-130 (https://github.com/wildfly/wildfly/pull/5737):

> diff --git a/build/src/main/resources/bin/add-user.sh b/build/src/main/resources/bin
> index 38cc026..074ed0c 100755
> --- a/build/src/main/resources/bin/add-user.sh
> +++ b/build/src/main/resources/bin/add-user.sh
> @@ -11,7 +11,7 @@ DIRNAME=`dirname "$0"`
>  # OS specific support (must be 'true' or 'false').
>  cygwin=false;
>  if  [ `uname|grep -i CYGWIN` ]; then
> -    cygwin = true;
> +    cygwin=true;
>  fi
>  
>  # For Cygwin, ensure paths are in UNIX format before anything is touched



Cloning for EAP 6.3.0.
Comment 2 Petr Kremensky 2014-02-24 09:06:12 EST
We should try to fix also the second problem as add-user is still not working with cygwin.

Using add-user.sh with cygwin:

EAP 6.2.0.GA
./add-user.sh
./add-user.sh: line 14: cygwin: command not found
Error: Unable to access jarfile /cygdrive/w/pkremens/jboss-eap-6.2/jboss-modules.jar

EAP 6.3.0.DR0
./add-user.sh 
cygpath: can't convert empty path
Exception in thread "main" java.lang.IllegalStateException: JBAS015232: No java.io.Console available to interact with user.
	at org.jboss.as.domain.management.security.adduser.AddUser.<init>(AddUser.java:74)
	at org.jboss.as.domain.management.security.adduser.AddUser.main(AddUser.java:215)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.jboss.modules.Module.run(Module.java:292)
	at org.jboss.modules.Main.main(Main.java:455)
Comment 3 Permaine Cheung 2014-02-24 09:39:59 EST
The original reported problem has been committed, the second one needs to be look at by dev, please file a separate BZ for that.
Comment 4 Petr Kremensky 2014-02-24 10:21:30 EST
Closing this one as script was fixed. Opened a new issue for add-user as such. See BZ1069252.

Verified on EAP 6.3.0.DR0

Note You need to log in before you can comment on or make changes to this bug.