]> git.zerfleddert.de Git - m1-debian/blame - files/rc.local
working on rc.local
[m1-debian] / files / rc.local
CommitLineData
e1af00a3
TG
1#!/usr/bin/perl
2
3# [x] resize root filesystem
4# [ ] find boot partition
5# [ ] generate fstab
6# [ ] mount boot
7# [ ] extract wifi firmware
8# [ ] reloads the kernel modules
9# [ ] install grub
10# [ ] disables itself
11
12sub
13find_root_device
14{
15 open(MOUNT, '<', '/proc/mounts') || die ("Can not open /proc/mounts for reading: $!");
16 my @lines = <MOUNT>;
17 close(MOUNT);
18
19 for (@lines) {
20 if (/^([\S]+)+ \/ /) {
21 return $1;
22 }
23 }
24
25 die("Could not find root device");
26}
27
28my $root_block_device = find_root_device();
29
30system("resize2fs $root_block_device");
Impressum, Datenschutz