- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Fail to create depot with whitespace in file names
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 10:23 PM
тАО02-22-2009 10:23 PM
I'm trying to create a depot with swpackage and some of the files to be delivered contain whitespace in filenames. I created below psf:
directory /tmp/tc_output2.2/HPUX11.0/prepackage/proot/SpaceInFileName=/
file -m 555 -o bin -g bin opt/OV/bin/file Space In Name
The file I tried to deliver is "file Space In Name" but swpackage reported an error and said 'opt/OV/bin/file' couldn't be found.
I also tried double-quote surrounding file name but swpackage reported error again.
Is there anybody know how to package a file with space in its name? Any help is appreciated!
Thank you in advance!
Jianbo
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 10:53 PM
тАО02-22-2009 10:53 PM
Re: Fail to create depot with whitespace in file names
keyword value
Use double quotes (") to define values that span multiple lines:
"This is an example of a
two-line value."
#
Double quotes (") are optional when defining a value that contains embedded whitespace.
### Also check that nsswitch.conf contains
hosts: files dns
## /etc/hosts contains the correct hostname to IP address mapping and nslookup works fine.
# swagentd -r
>> Then again try to install
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 11:00 PM
тАО02-22-2009 11:00 PM
Re: Fail to create depot with whitespace in file names
I tried:
directory /tmp/tc_output2.2/HPUX11.0/prepackage/proot/SpaceInFileName=/
file -m 555 -o bin -g bin "opt/OV/bin/file Space In Name"
Got below errors:
ERROR: Invalid definition for the file "Space", beginning at line 41.
Valid file definitions are of the form:
file [-t type] [-m mode | -u umask] [-o [owner[,]][uid]] \
[-g [group[,]][gid]] [-v] source [dest]
Seems that it ignored double quote and considered the " Space" as optional [dest] value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 11:19 PM
тАО02-22-2009 11:19 PM
Re: Fail to create depot with whitespace in file names
Please try like above
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 11:20 PM
тАО02-22-2009 11:20 PM
Re: Fail to create depot with whitespace in file names
http://forums11.itrc.hp.com/service/forums/helptips.do?#33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2009 11:24 PM
тАО02-22-2009 11:24 PM
Re: Fail to create depot with whitespace in file names
I have tried this before but didn't help. It reported the same error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 03:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 06:27 AM
тАО02-23-2009 06:27 AM
Re: Fail to create depot with whitespace in file names
don't do that. UNIX isn't Windoozz. For this to work, everything in "swpackage" would have to be written to handle whitespace in names. As you've seen, it probably doesn't, or at least not well.
as noted above, rename to something more fitting for UNIX, say "_".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 06:35 AM
тАО02-23-2009 06:35 AM
Re: Fail to create depot with whitespace in file names
Besides swpackage, all of SD, including the IPD files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 08:10 AM
тАО02-23-2009 08:10 AM
Re: Fail to create depot with whitespace in file names
/opt/OV/bin/file\ Space\ In\ Name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 05:13 PM
тАО02-23-2009 05:13 PM
Re: Fail to create depot with whitespace in file names
Thanks Dennis and Oldschool, I think replace whitespace with _ would be a good choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 05:18 PM
тАО02-23-2009 05:18 PM
Re: Fail to create depot with whitespace in file names
Meanwhile, I tried * to cover all files in the parent directory. Those files with spaces in names had also been packaged successfully. However, this didn't meet my needs, because I want to set permission/ownership for each file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 05:35 PM
тАО02-23-2009 05:35 PM
Re: Fail to create depot with whitespace in file names
> I'm just a little bit confused. Why HPUX support whitespace in directory and file names but swpackage doesn't support it?
It's really a matter of parsing a line into component fields that matters. By default, the interfield-seperator ('IFS' of the shell environment) is a space, a tab, and/or a newline. The IFS separates words resulting from command or parameter substitution or a read(). It's quite legal to change the default IFS in a script, but this isn't generally needed. Perhaps one of the best examples of changing the IFS is when you want to parse the '/etc/passwd' file in a shell script. In that case, you set the IFS to a colon (":") such that each line read is automatically split into fields delimited by the colon.
Hence, a space character in a file name is quite legal, though generally cumbersome to deal with. You might liken the use there to the arbitrary addition of spaces among the letters of English words.
Regards!
...JRF...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 05:48 PM
тАО02-23-2009 05:48 PM
Re: Fail to create depot with whitespace in file names
HP-UX supports it because applications may want to use it. Probably SD tools don't support it because the installed files don't really need it, only what the user creates after it is installed.
>Those files with spaces in names had also been packaged successfully.
You might want to try swverify to see if it knows how to parse the spaces in the IPD.
>this didn't meet my needs, because I want to set permission/ownership for each file.
You can solve that by changing the ownership/permissions on the files before you run swpackage. Or if the permissions are the same, you can set up defaults.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 05:59 PM
тАО02-23-2009 05:59 PM
Re: Fail to create depot with whitespace in file names
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2009 05:59 PM
тАО02-23-2009 05:59 PM