diff options
-rw-r--r-- | fsset.py | 8 | ||||
-rw-r--r-- | isys/isys.py | 26 | ||||
-rwxr-xr-x | scripts/upd-instroot | 1 |
3 files changed, 35 insertions, 0 deletions
@@ -446,6 +446,7 @@ class jfsFileSystem(FileSystemType): self.formattable = 1 self.checked = 1 self.linuxnativefs = 1 + self.maxLabelChars = 16 # this is totally, 100% unsupported. Boot with "linux jfs" # at the boot: prompt will let you make new reiserfs filesystems # in the installer. Bugs filed when you use this will be closed @@ -468,6 +469,13 @@ class jfsFileSystem(FileSystemType): self.maxSizeMB = 1024 * 1024 + def labelDevice(self, entry, chroot): + devicePath = entry.device.setupDevice(chroot) + label = labelFactory.createLabel(entry.mountpoint, self.maxLabelChars) + rc = iutil.execWithRedirect("/sbin/jfs_tune", + ["jfs_tune", "-L", label, devicePath], + stdout = "/dev/tty5", + stderr = "/dev/tty5") def formatDevice(self, entry, progress, chroot='/'): devicePath = entry.device.setupDevice(chroot) diff --git a/isys/isys.py b/isys/isys.py index b10c5f7c7..29b77b339 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -497,6 +497,32 @@ def readXFSLabel(device, makeDevNode = 1): label = readXFSLabel_int(device) return label +def readJFSLabel_int(device): + jfslabel = None + try: + fd = os.open(device, os.O_RDONLY) + except: + return jfslabel + + os.lseek(fd,32768,0) + buf = os.read(fd, 180) + os.close(fd) + + if (len(buf) == 180 and buf[0:4] == "JFS1"): + jfslabel = string.rstrip(buf[152:168],"\0x00") + + return jfslabel + +def readJFSLabel(device, makeDevNode = 1): + if makeDevNode: + makeDevInode(device, "/tmp/disk") + label = readJFSLabel_int("/tmp/disk") + os.unlink("/tmp/disk") + else: + label = readJFSLabel_int(device) + return label + + def readExt2Label(device, makeDevNode = 1): if makeDevNode: makeDevInode(device, "/tmp/disk") diff --git a/scripts/upd-instroot b/scripts/upd-instroot index 30bbc8551..769965a71 100755 --- a/scripts/upd-instroot +++ b/scripts/upd-instroot @@ -261,6 +261,7 @@ sbin/fsck.xfs sbin/fdisk sbin/hdparm sbin/hwclock +sbin/jfs_tune sbin/ldconfig sbin/lvchange sbin/lvcreate |