Sponsored Content
Top Forums Shell Programming and Scripting Fdisk and grep command not working in udev trigger Post 303023189 by lxdorney on Wednesday 12th of September 2018 06:58:06 PM
Old 09-12-2018
Quote:
Originally Posted by Scott
Looking at the output(mount /media/usb/test), DEVNAME is not set. It looks like the previous fdisk command is not returning anything. What is fdisk -l |grep FAT16 |awk '{print $1}' returning if you run it manually?

If DEVNAME isn't set, the won't get the name, and will look for it in the fstab / mtab for how / what to mount.
Supposedly it will return /dev/sdb1 in my case, already tried manually like this DEVNAME="/dev/sdb1" and put echo $DEVNAME and i see the output, but is not mounting
 

10 More Discussions You Might Find Interesting

1. Linux

udev core 5

installed fedora core 5 on a pc with USB and some usual things. in boot up it is stopped at "Starting udev:". Its harddisk light is busy. is it reconfiguring the kernel?. what do to solve this problem?. (0 Replies)
Discussion started by: GJ2
0 Replies

2. Shell Programming and Scripting

How can I trigger another make command when one is finished?

Hello all I have to run manually make commands in our system the make compilations task's takes very long And I like to be able to run another make task right after one is finished. What is the best way to automate it ? (2 Replies)
Discussion started by: umen
2 Replies

3. Shell Programming and Scripting

Fdisk with grep problem

Hello! rescuecd:/var# fdisk -l | grep stupid Disk /dev/sda doesn't contain a valid partition table Disk /dev/sdb doesn't contain a valid partition table rescuecd:/var# It shows always this statement. Why? :( Raw fdisk -l shows rescuecd:/var# fdisk -l Disk /dev/sda: 750.1 GB,... (4 Replies)
Discussion started by: pug123
4 Replies

4. Shell Programming and Scripting

Grep command is not working when put into cron

Hi, I worte a script which runs perfect when i execute it manually. But when i scheduled into cron the grep command alone is not working. the sample script, /usr/bin/grep FTP $subfile > /tmp/tfsrec.dat tfs=`echo $?` if then echo "FTP FOUND" else echo "FTP NOT FOUND" Where... (5 Replies)
Discussion started by: thiru_cs
5 Replies

5. Filesystems, Disks and Memory

Udev label removes corresponding fdisk, sfdisk or lsvdev entry

I'm curious about the behavior where any udev labeled device causes that corresponding listing to disappear from fdisk, sfdisk, or in the case of RDAC, lsvdev. I have seen this on both EMC clariion and Sun Storagetek/Engenio 6540 arrays. We use RHEL5.1 and udev to create persistent labels for... (2 Replies)
Discussion started by: Radar
2 Replies

6. Shell Programming and Scripting

Pass params with Udev

Hello! I'm sorry if this is the false Forum, didn't really knew where to put it... My question: I have serveral USB-Sticks and wrote several Udev-Rules for theme, each Sticks needs to do something else, but all are using the same script (they have common tasks to do) and only some parts are... (2 Replies)
Discussion started by: al0x
2 Replies

7. Solaris

what is the fdisk -l command of SUN

I use fdisk -l command to see the attached hard disk drives in rhel5 and cntos 5.5 what is the same command for sun 5.9 (4 Replies)
Discussion started by: z_haseeb
4 Replies

8. Shell Programming and Scripting

problem in automating "fdisk" command using send and expect

hi i want to automate fdisk command . i spawned a process containing fdisk command from a process and tried to send the options to fdisk promt from that process. but that spawed process is notstarting itself help me out trying for two days :wall: my code: #!/bin/bash echo... (5 Replies)
Discussion started by: jagak89
5 Replies

9. BSD

OpenBSD fdisk - Linux fdisk compatibility ?

Hello, MBR partition table made by linux fdisk looks certainly not correct when printed by openbsd fdisk: Partition table created on linux (centos 6.3): # fdisk -l /dev/sdc Disk /dev/sdc: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 *... (2 Replies)
Discussion started by: vilius
2 Replies

10. UNIX for Beginners Questions & Answers

Grep command is not working

I have made a program that reads a text file and checks for palindromic words and then outputs them. They each appear on a new line with a count of the number of occurences beside each of the words. Requirements for being classed as palindrome are that the word must have at least 3 letters and... (7 Replies)
Discussion started by: greenhouse91
7 Replies
LP5250D(1)						      General Commands Manual							LP5250D(1)

NAME
lp5250d - start an AS/400 printer session SYNOPSIS
lp5250d [OPTIONS] HOSTNAME DESCRIPTION
lp5250d connects to an AS/400 over TCP/IP and provides a printer session emulating an IBM 3812 printer. The printer session works with scs2ascii and host print transform on the AS/400 to print AS/400 spooled files on a local printer. To end a printer session, send it a SIGTERM signal with kill(1). Printing support requires named session support, which is available for most recent versions of OS/400, but is only supplied with V4R3 and later versions. For V3R2, V3R7, V4R1 and V4R2, please see informational APAR II10918. OPTIONS
Additional lp5250d options are described in the tn5250rc(5) man page. -u, --user=USER run lp5250d as USER -H, --help display this help and exit -v, --version output version information and exit EXAMPLES
lp5250d env.DEVNAME=LINPRT1 env.IBMMFRTYPMDL='*HP4' as400sys Connect to as400sys as the printer LINPRT1, using host print transform on the AS/400 to print to an HP Laserjet or compatible using lpr. lp5250d env.DEVNAME=LINPRT1 env.IBMMFRTYPMDL='*OKI184IBM' outputcommand=''scs2ascii | lpr -Poki' as400sys Print to an Okidata Microline 184 Turbo on the local print queue named `oki'. lp5250d env.DEVNAME=PSPRT outputcommand='scs2ps > scs$$.ps' as400sys Convert spooled files into PostScript(R) files. BUGS
Please report any bugs you find to the bug tracker or to the linux5250 mailing list. See the tn5250 web site for more details. SEE ALSO
tn5250rc(5), tn5250(1), scs2ascii(1), scs2ps(1), http://tn5250.sourceforge.net/, RFC1205, RFC2877, II10918. COPYRIGHT
tn5250 is copyright 1997 - 2001 Michael Madore. This manpage is copyright 1999 - 2001 Carey Evans. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as pub- lished by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foun- dation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA TRADEMARKS
PostScript is a trademark of Adobe Systems Incorporated. AUTHORS
tn5250 was written by Michael Madore, Jay Felice, Scott Klement and others; see the AUTHORS file for details. This manual page was written by Carey Evans. 12 November 2001 LP5250D(1)
All times are GMT -4. The time now is 11:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy