mirror of
https://github.com/fspc/gbootroot.git
synced 2025-04-04 07:43:22 -04:00
Making sure normal users get a /dev directory when fs_size > 8192.
This commit is contained in:
parent
e8e6d63700
commit
d67ceb97bb
@ -157,7 +157,7 @@ sub kernel_version_check {
|
|||||||
## REQUIRES $contents_file
|
## REQUIRES $contents_file
|
||||||
sub read_contents_file {
|
sub read_contents_file {
|
||||||
|
|
||||||
my ($contents_file, $mnt) = @_;
|
my ( $contents_file, $mnt, $fs_size ) = @_;
|
||||||
my $error;
|
my $error;
|
||||||
|
|
||||||
# It's a good idea to clear the text buffer in the verbosity box
|
# It's a good idea to clear the text buffer in the verbosity box
|
||||||
@ -196,7 +196,7 @@ sub read_contents_file {
|
|||||||
system "rm -rf $mnt/loopback";
|
system "rm -rf $mnt/loopback";
|
||||||
|
|
||||||
#<path> <type> <mode> <uid> <gid> <major> <minor> <start><inc><count>
|
#<path> <type> <mode> <uid> <gid> <major> <minor> <start><inc><count>
|
||||||
# /dev is always needs to be made automatically
|
# /dev always needs to be made automatically
|
||||||
open(DEVICE_TABLE, ">$mnt/device_table.txt") or
|
open(DEVICE_TABLE, ">$mnt/device_table.txt") or
|
||||||
($error = error("$mnt/device_table.txt: $!"));
|
($error = error("$mnt/device_table.txt: $!"));
|
||||||
return "ERROR"if $error && $error eq "ERROR";
|
return "ERROR"if $error && $error eq "ERROR";
|
||||||
@ -231,7 +231,7 @@ sub read_contents_file {
|
|||||||
# devices and process them individually, globbing if necessary,
|
# devices and process them individually, globbing if necessary,
|
||||||
# and appending the changes to the device table. --freesource
|
# and appending the changes to the device table. --freesource
|
||||||
|
|
||||||
if ( $fs_type eq "genext2fs" ) {
|
if ( $fs_type eq "genext2fs" && $fs_size <= 8192 ) {
|
||||||
|
|
||||||
# If a device is found on the same line with a non-device(s)
|
# If a device is found on the same line with a non-device(s)
|
||||||
# the non-device(s) is sent on its merry way.
|
# the non-device(s) is sent on its merry way.
|
||||||
|
@ -599,7 +599,8 @@ sub continue {
|
|||||||
|
|
||||||
sub check {
|
sub check {
|
||||||
|
|
||||||
my $error = read_contents_file("$template_dir$template", $tmp);
|
my $error = read_contents_file("$template_dir$template", $tmp,
|
||||||
|
$filesystem_size);
|
||||||
return if $error && $error eq "ERROR";
|
return if $error && $error eq "ERROR";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -213,6 +213,7 @@ $Id
|
|||||||
/dev/console
|
/dev/console
|
||||||
|
|
||||||
# Empty directories with no stuff.
|
# Empty directories with no stuff.
|
||||||
|
/dev # needed for normal users
|
||||||
/mnt
|
/mnt
|
||||||
/proc
|
/proc
|
||||||
/tmp
|
/tmp
|
||||||
@ -263,7 +264,7 @@ return $stuff;
|
|||||||
use strict;
|
use strict;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
my $rm = "\$";
|
my $rm = "\$";
|
||||||
$main::Id = "# \$Id: make_debian-X11,v 1.37 2001/12/11 07:17:34 freesource Exp $rm";
|
$main::Id = "# \$Id: make_debian-X11,v 1.38 2001/12/13 04:21:33 freesource Exp $rm";
|
||||||
my $sbin = grep(/\/usr\/sbin/,$ENV{'PATH'});
|
my $sbin = grep(/\/usr\/sbin/,$ENV{'PATH'});
|
||||||
if ($sbin == 0) {
|
if ($sbin == 0) {
|
||||||
$ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'};
|
$ENV{'PATH'} = "/usr/sbin:" . $ENV{'PATH'};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $Id: Example-Debian.yard,v 1.8 2001/12/12 05:12:46 freesource Exp $
|
# $Id: Example-Debian.yard,v 1.9 2001/12/13 03:01:15 freesource Exp $
|
||||||
# Generated by make_debian.
|
# Generated by make_debian.
|
||||||
|
|
||||||
# Note: This is provided as an example to show how a macro distribution
|
# Note: This is provided as an example to show how a macro distribution
|
||||||
@ -134,6 +134,7 @@
|
|||||||
/dev/console
|
/dev/console
|
||||||
|
|
||||||
# Empty directories with no stuff.
|
# Empty directories with no stuff.
|
||||||
|
/dev # needed for normal users
|
||||||
/mnt
|
/mnt
|
||||||
/proc
|
/proc
|
||||||
/tmp
|
/tmp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user