]> git.pld-linux.org Git - packages/anaconda.git/blob - anaconda-vserver-proc.patch
- try with version 11.2.0.24
[packages/anaconda.git] / anaconda-vserver-proc.patch
1 --- anaconda-11.0.5/constants.py        2006-03-07 18:45:05.000000000 +0200
2 +++ /usr/lib/anaconda/constants.py      2006-05-17 23:50:54.459319784 +0300
3 @@ -21,9 +21,12 @@
4  
5  SELINUX_DEFAULT = 1
6  
7 -cmdline = open("/proc/cmdline", "r").read()
8 -if cmdline.find("debug") != -1:
9 -    DEBUG = 1
10 +try:
11 +       cmdline = open("/proc/cmdline", "r").read()
12 +       if cmdline.find("debug") != -1:
13 +               DEBUG = 1
14 +except:
15 +         pass
16  
17  DISPATCH_BACK = -1
18  DISPATCH_FORWARD = 1
19 --- anaconda-11.0.5/flags.py    2006-02-09 20:43:41.000000000 +0200
20 +++ /usr/lib/anaconda/flags.py  2006-05-17 23:54:11.513723977 +0300
21 @@ -49,22 +49,25 @@
22          self.__dict__['flags']['virtpconsole'] = None
23  
24  
25 -        # determine if selinux is enabled or not
26 -        f = open("/proc/cmdline", "r")
27 -        line = f.readline()
28 -        f.close()
29 +        try:
30 +              # determine if selinux is enabled or not
31 +              f = open("/proc/cmdline", "r")
32 +              line = f.readline()
33 +              f.close()
34  
35 -        tokens = line.split()
36 -        for tok in tokens:
37 -            if tok == "selinux":
38 -                self.__dict__['flags']['selinux'] = 1
39 -            elif tok == "selinux=0":
40 -                self.__dict__['flags']['selinux'] = 0
41 -            elif tok == "selinux=1":
42 -                self.__dict__['flags']['selinux'] = 1
43 +              tokens = line.split()
44 +              for tok in tokens:
45 +                  if tok == "selinux":
46 +                      self.__dict__['flags']['selinux'] = 1
47 +                  elif tok == "selinux=0":
48 +                      self.__dict__['flags']['selinux'] = 0
49 +                  elif tok == "selinux=1":
50 +                      self.__dict__['flags']['selinux'] = 1
51  
52 -        if not os.path.exists("/selinux/load"):
53 -            self.__dict__['flags']['selinux'] = 0
54 +              if not os.path.exists("/selinux/load"):
55 +                  self.__dict__['flags']['selinux'] = 0
56 +        except:
57 +          pass
58  
59                  
60  global flags
61 --- anaconda-11.0.5/iutil.py    2006-02-06 23:06:46.000000000 +0200
62 +++ /usr/lib/anaconda/iutil.py  2006-05-17 23:55:32.015524290 +0300
63 @@ -641,13 +641,16 @@
64      myarch = rhpl.arch.canonArch
65  
66      # now allow an override with rpmarch=i586 on the command line (#101971)
67 -    f = open("/proc/cmdline", "r")
68 -    buf = f.read()
69 -    f.close()
70 -    args = buf.split()
71 -    for arg in args:
72 -        if arg.startswith("rpmarch="):
73 -            myarch = arg[8:]
74 +    try:
75 +        f = open("/proc/cmdline", "r")
76 +        buf = f.read()
77 +        f.close()
78 +        args = buf.split()
79 +        for arg in args:
80 +            if arg.startswith("rpmarch="):
81 +                myarch = arg[8:]
82 +    except:
83 +        pass
84  
85      # now make the current install believe it, too
86      rhpl.arch.canonArch = myarch            
This page took 0.053392 seconds and 3 git commands to generate.