path: root/meta/recipes-core/base-files/base-files
Commit message (Collapse)AuthorAgeFilesLines
* netbase/base-files: move /etc/hosts from netbase to base-filesChen Qi2019-01-081-0/+8
| | | | | | | | | Move /etc/hosts to base-files, and also add entry to it according to hostname setting. This fixes the problem of commands like `hostname -f' failing due to lack of such entry. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: fix handling of resizeChen Qi2018-08-141-5/+1
| | | | | | | | | | | | | The current handling of resize is incorrect. Using `resize > /dev/null 2>&1 && resize > /dev/null' will cause the second resize command to not execute because 'resize > /dev/null 2>&1' will fail for resize utility from busybox. What we really should do is just to check whether ${bindir}/resize is executable and execute it if so. Using '-x' is sufficient. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: profile: Avoid using "command" to determine if programs existPeter Kjellerstedt2018-07-261-8/+10
| | | | | | | | | | Since the existence of "command" in itself is not guaranteed, using it to determine if other executables exist is moot. Instead just run the executables and let the shell determine if they exist. By piping stderr to /dev/null we avoid unnecessary warnings in case they do not exist. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* base-files: ignore "mesg n" error messagesPatrick Ohly2017-07-171-1/+2
| | | | | | | | | | | | | | | | | | | | When using "su - myuser" to change from root to a non-privileged user, "mesg n" from the default .profile fails with "mesg: error: tty device is not owned by group `tty' or "mesg: cannot open /dev/ttyS0: Permission denied", depending on whether mesg comes from busybox or util-linux. This does not happen during a normal login because permissions on /dev/tty* get changed while doing that, something that isn't possible with plain "su -". As the error can't be avoided and failures of mesg probably aren't particularly important, now error messages get dumped to /dev/null. [YOCTO #11127] Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* base-files: profile: Simplify setting variables conditionallyPeter Kjellerstedt2017-05-161-8/+6
| | | | | | | | It is preferred to use `[ "$FOO" ] || ...` instead of `[ -z "$FOO" ] && ...` as the latter leaves $? set to 1. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* base-files: profile: Do not assume that the tty command existsPeter Kjellerstedt2017-04-081-3/+3
| | | | | | | | | | | This avoids the following error when logging in to a host that does not have the tty command: -sh: tty: not found Reported-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: profile: Whitespace clean upPeter Kjellerstedt2017-04-081-14/+15
| | | | | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: resize only serial tty's in profileDaniel Díaz2017-03-311-1/+1
| | | | | | | | | | | | | | | | | | We don't want to run resize on non serial consoles. There's been an earlier attempt (6557787), so this builds upon that. The problem we're seeing is that if there is text buffered in the virtual console (like from a desperate user trying to enter login details), resize will get stuck while calling ioctl(tty, TCSETAW); Since serial consoles are named (not just numbered), this change limits resize's reach even further to run only on /dev/tty[A-z] (thus avoiding /dev/tty[0-9]). Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: fix profile error under < /dev/nullRichard Tollerton2016-10-151-2/+4
| | | | | | | | | | | Previous attempts to constrain execution of `resize` to only TTYs did not properly handle situations when `tty` would return the string "not a tty". The symptom is "/etc/profile: line 34: test: too many arguments". Fix this by utilizing the exit code of `tty`. Also use `case` instead of `cut` to eliminate a subshell. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* base-files: don't export TZ="UTC" from /etc/profileAndre McCurdy2016-10-051-6/+0
| | | | | | | | | | | | | If no /etc/localtime (or /etc/TZ for uclibc) is found, then the libc will default to UTC, so setting UTC as a fallback default via the TZ environment variable is redundant. Since having the TZ environment variable set causes /etc/localtime to be ignored, it can cause confusion if /etc/localtime is added interactively after /etc/profile has been run. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: Add shell test quotingJussi Kukkonen2016-09-031-1/+1
| | | | | | | | tty can return "not a tt" which results in warnings when /etc/profile is executed. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: restrict resize to run on serial consoles only in profile │·bavery2016-08-101-3/+4
| | | | | | | | | | We don't need/wan't to run resize on an ssh connection. It's useless and it breaks the Eclipse SSH debug connection. So, we added a check. YOCTO #9362 Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* base-files: add some safety checks in profileDiego Rondini2016-05-091-2/+4
| | | | | | | | | | | | | | | Add some safety checks when sourcing files in /etc/profile.d/, in particular: - source only *.sh files, not every file. This is the practice in use in both Fedora and Debian/Ubuntu (see https://help.ubuntu.com/community/EnvironmentVariables#A.2Fetc.2Fprofile.d.2F.2A.sh); - check the input is actually a file and is readable. This check is especially important if profile.d is empty, as "*.sh" will get expanded only if profile.d is not empty. Previously if profile.d was present but empty, "/etc/profile.d/*" was sourced causing errors on login and breaking stuff, for example X startup. Signed-off-by: Diego Rondini <diego.ml@zoho.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* readline: move inputrc into readlineJoseph A. Lutz2016-01-071-61/+0
| | | | | | | inputrc is the global configuration file for the readline library. Signed-off-by: Joseph A. Lutz <joseph.lutz@novatechweb.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* base-files: Remove /proc/bus/usb from fstab.Andreas Oberritter2015-05-151-1/+0
| | | | | | | The usb filesystem was removed in Linux 3.5. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files/profile: change EDITOR to not be busybox specificPaul Gortmaker2015-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | Setting "EDITOR=/bin/vi" breaks on non-busybox systems, as vim will populate /usr/bin/vi instead, and you get stuff like: op3:~/poky/meta-builder$ git commit -s error: cannot run /bin/vi: No such file or directory error: unable to start editor '/bin/vi' Please supply the message using either -m or -F option. op3:~/poky/meta-builder$ which vi /usr/bin/vi op3:~/poky/meta-builder$ Since we've already specified a proper path above in the profile, we've no need to call out where in the path vi lives, and hence this will work with busybox and a full vim install w/o busybox. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
* base-files: set dynamic COLUMNS via resize commandTing Liu2014-08-061-0/+4
| | | | | | | | | | By default, COLUMNS is set to 80. If possible, run 'resize' to determine what the current dimensions are. This avoids the final part of long lines overlap the start of the same line. Signed-off-by: Ting Liu <ting.liu@freescale.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: Don't export TZ if /etc/TZ existsRichard Tollerton2014-07-251-1/+1
| | | | | | | | | | | While glibc/eglibc looks for the time zone in /etc/localtime, other libc alternatives (e.g. uclibc) may look for it in /etc/TZ. If /etc/TZ exists, don't fall back to setting TZ to "UTC" in /etc/profile. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Ben Shelton <ben.shelton@ni.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: use /dev/root in /etc/fstab for systemd supportJonathan Liu2014-03-211-1/+1
| | | | | | | | | | | | | | | | | systemd does not recognize "rootfs" in /etc/fstab so the root filesystem is not checked. As a result, the following message is logged by journalctl: systemd-fstab-generator[68]: Checking was requested for "rootfs", but it is not a device Changing "rootfs" to "/dev/root" in /etc/fstab allows systemd to check the root filesystem when the kernel is booted with the root filesystem mounted read-only. [YOCTO #5950] Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: remove invalid entries from /etc/shellsMing Liu2013-10-261-6/+0
| | | | | | | | | It's more reasonable and secure to keep /etc/shells a minimal file, and then entries for valid shells be added dynamically to the system, only if the packages that provide them are supported. Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
* base-files: remove the unnecessary /media/xxx directoriesChen Qi2013-07-021-1/+0
| | | | | | | | | | | | | | | | | A few directories under /media were created by default, /media/card, /media/ram, /media/realroot, etc. These directories actually have no real usage now, thus removing them. The /media/ram entry in the fstab is also removed, as mounting a tmpfs over /media/ram in our system brings no benefit. Note that a duplicate '/mnt' entry in dirs755 are also removed. [Yocto #4774] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
* base-files: add /run directory from FHS 3 draft specificationJonathan Liu2013-05-291-0/+1
| | | | | | | | | | | | | | | | | This adds the /run directory from the Filesystem Hierarchy Standard 3.0 Draft [1] and refactors the filesystem as follows: - Remove creation of /var/volatile/run - Remove creation of /var/volatile/lock - Remove symbolic link from /var/run to /var/volatile/run - Remove symbolic link from /var/lock to /var/volatile/lock - Add symbolic link from /var/run to /run - Add symbolic link from /var/lock -> /run/lock - Add /run to /etc/fstab for sysvinit compatibility [1] http://www.linuxbase.org/betaspecs/fhs/fhs.html#runRuntimeVariableData Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
* Revert "base-files: add fstab for systemd based systems"Andreas Oberritter2013-03-261-9/+0
| | | | | | | | | | | | | | For hybrid systemd/sysvinit builds, only one fstab can be used. The default fstab used by sysvinit should work fine with systemd. Since virtually every machine will ship its own fstab in its bsp layer, the bsp layer may decide how to override the fstab based on distro features. This reverts commit 77bbb839ba25b974a538b90d346b454ccd5deefd. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
* base-files: add fstab for systemd based systemsMartin Donnelly2013-01-201-0/+9
| | | | | | | | | | | The default fstab has entries which are not necessary in systemd based systems so add a simpler default in this case. Signed-off-by: Martin Donnelly <martin.donnelly@ge.com> Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: use dynamic root home directoryKang Kai2012-12-251-1/+1
| | | | | | | Use var ROOT_HOME to configure root home directory dynamically. Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
* base-files: filesystems: fix mount orderGary Thomas2012-01-061-4/+5
| | | | | | | | | | | | | | | | | | This changes the order that file system [types] are tried when using 'mount' in busybox when the file system type is not explictly specified. The pervious ordering is incorrect in that less capable file system types are tried first, e.g. ext2 before ext3, which will cause an ext3 file system to be mounted as ext2, disabling some of the ext3 features such as journaling. The change also moves infrequently used file system types to the end as checking for them is just a waste of effort in most cases. The list now also includes ext4. [RP: Add PR bump, unbreak patch application] Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* OECore license fixes: meta/*Elizabeth Flanagan2011-12-087-2386/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This is a quick audit of only the most obviously wrong licenses found within OECore. These fixes fall into four areas: - LICENSE field had incorrect format so that the parser choked - LICENSE field has a license with no version - LICENSE field was actually incorrect - LICENSE field has an imaginary license that didn't exist This fixes most of the LICENSE warnings thrown, along with my prior commit adding additional licenses to common-licenses and additional SPDXLICENSEMAP entries. HOWEVER..... there is much to be done on the license front. For a list of recipes with licenses that need obvious fixing see: https://wiki.yoctoproject.org/wiki/License_Audit That said, I would suggest another license audit as I've found enough inconsistencies. A good suggestion is when in doubt, look at how openSuse or Gentoo or Debian license the package. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
* base-files: add btrfs to /etc/filesystemsNitin A Kamble2011-06-301-0/+1
| | | | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* Remove machine-specific metadata for machines no longer in oe-corePaul Eggleton2011-05-0417-148/+0
| | | | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* base-files: Remove sysctl.conf file. This is now provided by the procpc recipe.Richard Purdie2011-03-241-29/+0
| | | | | | | | The base-files version is horribly outdated too. [YOCTO #924] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base-files: remove ending colon from default $PATH for root userKevin Tian2011-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now the PATH for root user defined in a problematic way PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin: from eglibc: /* Two adjacent colons, or a colon at the beginning or the end of `PATH' means to search the current directory. */ that means current directory is always searched as the last path, which could generate undesired behavior. One example is found in LTP cron_deny01 test, which always complains "sh: cron_deny01 not found" cron_deny01 is a shell script which setups the initial test preparation and then invokes itself for real test under a different user: su $TEST_USER1 -c "$0" 'su' doesn't inherit PATH into the sub-shell, and thus $0 has to be an absolute path to have right script found. ltp appends the path of cron_deny01 to $PATH before running the test: export PATH="${PATH}:${LTPROOT}/testcases/bin" In ideal way "${LTPROOT}/testcases/bin/cron_deny01" is found and becomes $0, which works well. However due to the ending colon in original PATH: PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin::${LTPROOT}/testcases/bin $0 becomes 'cron_deny01' w/o leading path which makes sub-shell under 'su' failed to locate cron_deny01. remove ending colon then fixes this problem. Signed-off-by: Kevin Tian <kevin.tian@intel.com>
* base-files: Allow a basic issue file to be extended by the code, following ↵Richard Purdie2010-11-022-5/+0
| | | | | | the method now used by OE Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Major layout change to the packages directoryRichard Purdie2010-08-2740-0/+3075
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>