Fedora-Kickstart, chroot cannot access to files been copied inside during %post -nochroot


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Fedora-Kickstart, chroot cannot access to files been copied inside during %post -nochroot
# 1  
Old 05-10-2014
RedHat Fedora-Kickstart, chroot cannot access to files been copied inside during %post -nochroot

Heyas

I did try with several paths, and it ran several times, so i'm tired of rebuilt it (takes 30min and laptop is up to 90+C on cpu temp) just to see an empty skeleton dir.

I once had the kickstart files in the root dir, but somehow the files retrieved from git, seem to be missing.
Had them saved to $root/tmp/BLUB first, but since they disapread on the live image, i'd started to assume the /tmp dir might been 'overwritten', thus the files wouldlie beneath the mountpoint of /tmp, right?

Not all kickstarts posted, only the one/two relevant, and the script with wich i build the iso.

Any ideas why those code from GIT is available on local host (nochroot) /mnt/sea_awesome_wm/install_root/sea/GIT-THINGS, but fails to be found in chroot?
edit /* doing so to avoid the need of establishing an internetconnection (bind) from within/out the chroot */

Thank you in advance for any thoughts / input.

EDIT:
All files can be found at https://github.com/sri-arjuna/awesome-spin

Last edited by sea; 05-10-2014 at 07:48 PM.. Reason: some updates/fixes
# 2  
Old 05-11-2014
Was quite simple...
Only had to change:
Code:
root=$mount_root/install_root

to:
Code:
root="$(printf $(ls -d $mount_root/* | awk '{print $1}')|tr -d [:space:])/install_root"

/solved
# 3  
Old 05-11-2014
Quote:
Originally Posted by sea
Code:
root="$(printf $(ls -d $mount_root/* | awk '{print $1}')|tr -d [:space:])/install_root"

That is one bizarre line of sh script. I'm not sure what it is that you think it does, but this is what it's actually doing:

ls prints the name of each item in the directory, one line per item.

If there is a space or tab in the filename, awk will only print the first word of the name.

The list of names is then passed to printf. The first argument to printf will be treated as the format string. The output of printf will depend on the contents of the first pathname emitted by ls. If there are no conversion specifiers in the name, only that first pathname is printed. If there are conversion specifiers, the output depends on their number and type.

Whatever comes out of printf goes through tr where space characters are removed. Unless you're trying to delete uncommon whitespace, such as vertical tabs, form feeds, or carriage returns, tr will not accomplish anything; tabs and spaces have already been removed by awk (and if they hadn't been, they would have been by the field splitting of the results of the ls|awk command substitution).

Even if all of the above is as intended, the unquoted [:space:] is a bug. It is a valid sh pathname pattern, so, if there is a file in the current directory named 's', or 'p', or 'a', or 'c', or 'e', or ':', tr will never see '[:space:]', but instead the single character with which the shell globbing mechanism replaced it.

Again, not sure what you're trying to do, but that line of shell script is beyond wacky.

Regards,
Alister

Last edited by alister; 05-11-2014 at 10:54 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check files copied from remote server

There is a process which copy files form unix a to unix b I would like to check whether all files copied from a to b or not ,and list which are the missing files. Is there a command to check like that (3 Replies)
Discussion started by: lalitpct
3 Replies

2. Shell Programming and Scripting

no of files copied by scp command

hi, I have a script which copy files by using scp command. when i run that script, i can see the process meter but I want to know how many files have been copied. suppose, by using scp 10 files is being copied and I can see process meter for all 10 files. but i also want to see ... that 10... (0 Replies)
Discussion started by: anshu ranjan
0 Replies

3. AIX

openssh chroot facility and directory access

Good day. I currently have a request to have sftp access to a specific directory for a user(s). They can have access to that folder only, and nothing below it. Now here is the gotcha that seems to be catching me. The folder they need access to is NOT owned by root, and most of the parent... (0 Replies)
Discussion started by: smurphy_it
0 Replies

4. UNIX for Advanced & Expert Users

chroot openssh access www folder

here is the setup<br/> sshd_config: <pre> Match User sftp ChrootDirectory /chroot/sftp </pre> I connect just fine to the folder <pre>/chroot/sftp</pre> However I cannot access the website developer folder due to it being outside the scope of the defined chrootdirectory... (2 Replies)
Discussion started by: dunpealslyr
2 Replies

5. UNIX for Advanced & Expert Users

Monitor files being copied/accessed

Hello, Is there a way (without 3rd party software) to know if a file has been accessed and/or copied ? I'm interested in any solution : doing command line instructions , running background scripts etc... I apologize if I posted this in the wrong forum. Thank you! (8 Replies)
Discussion started by: prostiiinet
8 Replies

6. Debian

Secure ftp access to outside chroot

I want to setup ftp on my home server running debian 5.0 I found this guide and have read it carefully. Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On Debian Lenny | HowtoForge - Linux Howtos and Tutorials Before I install/config it I want to know if its... (1 Reply)
Discussion started by: chipmunken
1 Replies

7. Linux

Unable to access fedora 10 shared folder from windows

Linux OS : Fedora 10 (No graphical mode) Windows OS : XP and Windows Server NT I am able to access from my windows to linux using following step //fedora10 ip username of admin and password I am able to view the admin and shared printer of fedora 10. When i try to enter in the admin... (0 Replies)
Discussion started by: nightmare49
0 Replies

8. UNIX for Dummies Questions & Answers

Ignoring already copied files

I'm almost brand new to UNIX, so I have no idea if how easy or difficult this would be, or if it's even possible. I've been using FTP to copy a total of about 150gb of files to a remote drive. Since the directory being copied is so large, I've been trying to break it up into smaller chunks based... (0 Replies)
Discussion started by: nvandyke
0 Replies

9. Programming

monitoring files copied onto hard disk

hi... i need pointers to books/website... 'm trytin to write a daemon that monitors files of particular type(eg. text or pdfs) copied onto the hard disk. the daemon should detect the above n write the file name (along with the absolute path) to a file. please DO NOT give me the code... (2 Replies)
Discussion started by: abhi_abhijith
2 Replies
Login or Register to Ask a Question